Monday, 10 January 2022

Kubernetes - messing about with nodes and taints

I've probably blogged about this before, but, today, I'm tinkering with Kubernetes ( well, OpenShift Container Platform ) nodes, in terms of understanding what taints are applied to what nodes, in order that I can assign pods accordingly.

This command was immensely useful: -

kubectl get nodes -o custom-columns=NAME:.metadata.name,TAINTS:.spec.taints

NAME           TAINTS
192.168.0.4    <none>
192.168.16.4   [map[effect:NoExecute key:dedicated value:transit]]
192.168.20.4   [map[effect:NoExecute key:dedicated value:transit]]
192.168.24.4   [map[effect:NoExecute key:dedicated value:transit]]
192.168.32.4   [map[effect:NoExecute key:dedicated value:edge]]
192.168.36.4   [map[effect:NoExecute key:dedicated value:edge]]
192.168.4.4    <none>
192.168.40.4   [map[effect:NoExecute key:dedicated value:edge]]
192.168.8.4    <none>
with thanks to StackOverflow: -


The official Kubernetes documentation has much to say about taints: -



No comments:

Note to self - use kubectl to query images in a pod or deployment

In both cases, we use JSON ... For a deployment, we can do this: - kubectl get deployment foobar --namespace snafu --output jsonpath="{...