Difference between revisions of "Kubectl patch"
Jump to navigation
Jump to search
Line 17: | Line 17: | ||
Stop [[DaemonSet]] by appliying a [[nodeSelector]] | Stop [[DaemonSet]] by appliying a [[nodeSelector]] | ||
* <code>[[kubectl patch]] daemonset <name-of-daemon-set> -p '{"spec": {"template": {"spec": {"nodeSelector": {"non-existing": "true"}}}}}'</code> | * <code>[[kubectl patch]] daemonset <name-of-daemon-set> -p '{"spec": {"template": {"spec": {"nodeSelector": {"non-existing": "true"}}}}}'</code> | ||
− | Start | + | Start [[DaemonSet]] by removing the [[nodeSelector]] : |
kubectl patch daemonset <name-of-daemon-set> --type json -p='[{"op": "remove", "path": "/spec/template/spec/nodeSelector/non-existing"}]' | kubectl patch daemonset <name-of-daemon-set> --type json -p='[{"op": "remove", "path": "/spec/template/spec/nodeSelector/non-existing"}]' | ||
Revision as of 16:09, 21 December 2022
kubectl patch --help
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'
kubectl patch pv
kubectl patch pvc
kubectl patch sts elastic-operator
kubectl patch cronjobs
kubectl patch ValidatingWebhookConfiguration
Stop DaemonSet by appliying a nodeSelector
kubectl patch daemonset <name-of-daemon-set> -p '{"spec": {"template": {"spec": {"nodeSelector": {"non-existing": "true"}}}}}'
Start DaemonSet by removing the nodeSelector :
kubectl patch daemonset <name-of-daemon-set> --type json -p='[{"op": "remove", "path": "/spec/template/spec/nodeSelector/non-existing"}]'
kubectl get ds -A
Related
See also
Advertising: