Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save spensireli/b3237f6cea447d4ca6f731b06d60dd5b to your computer and use it in GitHub Desktop.
Save spensireli/b3237f6cea447d4ca6f731b06d60dd5b to your computer and use it in GitHub Desktop.
Kubernetes Gists
# Stop Daemonset (apply node selector)
kubectl -n <namespace> patch daemonset <name-of-daemon-set> -p '{"spec": {"template": {"spec": {"nodeSelector": {"non-existing": "true"}}}}}'
# Start Daemonset (remove node selector)
kubectl -n <namespace> patch daemonset <name-of-daemon-set> --type json -p='[{"op": "remove", "path": "/spec/template/spec/nodeSelector/non-existing"}]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment