Taint InstanceGroup on Kubernetes using kubectl

1/24/2019

I can taint a node but not an instance group.

kubectl taint nodes nodeA 
kops.k8s.io/instancegroup=loadbalancer:NoSchedule

can we do below

kubectl taint instanceGroup loadbalancer:NoSchedule 


error: at least one taint update is required
-- AhmFM
kubectl
kubernetes

1 Answer

1/25/2019

Instance Group is GCP thing and not a Kubernetes thing. Taints can only be done on nodes. So you will have to taint the nodes manually.

If you named the nodes in your instance group to something that matches mygroup. For example, you could do something like this:

$ kubectl taint nodes `kubectl get nodes -o name | grep mygroup` key=value:NoSchedule
-- Rico
Source: StackOverflow