Difference between revisions of "Kubectl patch daemonset"

From wikieduonline
Jump to navigation Jump to search
 
Line 7: Line 7:
 
  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"}]'
  
 
+
== See also ==
 
* {{DaemonSet}}
 
* {{DaemonSet}}
 
* {{kubectl patch}}
 
* {{kubectl patch}}
 +
 +
[[Category:Daemonset]]

Latest revision as of 11:30, 28 February 2024


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"}]'

See also[edit]

Advertising: