The docs are great about explaining how to set a taint on a node, or remove one. And I can use kubectl describe node
to get a verbose description of one node, inclu
You can use kubectl
's go-template output options to help you here,
kubectl get nodes -o go-template='{{range .items}}{{if $x := index .metadata.annotations "scheduler.alpha.kubernetes.io/taints"}}{{with $x := index .metadata.name}}{{.}}{{printf "\n"}}{{end}}{{end}}{{end}}'
On my cluster, this prints my masters, which are tainted:
kubemaster-1.example.net
kubemaster-2.example.net
kubemaster-3.example.net