Last active
March 27, 2019 11:45
-
-
Save itaysk/572d9b46a6dd4284970670bf2ca3acfb to your computer and use it in GitHub Desktop.
Kubernetes Pod Conditions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl get po mypod -ojson | jq '.status.conditions[] | select(.type=="mycondition") | .status' -r |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PATCH http://localhost:8080/api/v1/namespaces/default/pods/nginx/status | |
content-type: application/strategic-merge-patch+json | |
{ | |
"status": { | |
"conditions": [ | |
{ | |
"type": "MyCondition", | |
"status": "True", | |
//optional: | |
"lastProbeTime": "2019-02-19T11:32:10Z", | |
"lastTransitionTime": "2019-02-19T11:32:10Z", | |
"reason": "MyReason", | |
"message": "my message" | |
} | |
] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment