Skip to content

Instantly share code, notes, and snippets.

@alterEgo123
Created January 13, 2021 15:05
Show Gist options
  • Select an option

  • Save alterEgo123/85cba87cc226cc3691e67ef4f522ca93 to your computer and use it in GitHub Desktop.

Select an option

Save alterEgo123/85cba87cc226cc3691e67ef4f522ca93 to your computer and use it in GitHub Desktop.
Add/remove LivenessProbe from deployment
kubectl patch deployment X --patch '{"spec": {"template": {"spec": {"containers": [{"name": "Y","livenessProbe": {"httpGet":{"path": "health", "port":8080, "scheme": "HTTP"}, "periodSeconds": 3, "initialDelaySeconds": 3, "timeoutSeconds": 50}}]}}}}'
kubectl patch deployment X --patch '{"spec": {"template": {"spec": {"containers": [{"name": "Y","livenessProbe": null}]}}}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment