carlessanagustin
2/21/2020 - 12:20 PM

Enable/disable nodes from Kubernetes

Enable/disable nodes from Kubernetes

# ENABLE NODE
kc uncordon $NODE
kubectl taint nodes $NODE dedicated-

# NODE ID
export NODE=

# DISABLE NODE
kc drain $NODE --ignore-daemonsets
kubectl taint nodes $NODE dedicated=special-user:NoExecute

########

# WATCH NODES
watch kubectl get nodes
# watch "kubectl get nodes -o json | jq '.items[].spec.taints'"

########

# WATCH ALL PODS
watch kubectl get pods -o wide --sort-by="{.spec.nodeName}" --all-namespaces