Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@itaysk
Last active March 27, 2019 11:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itaysk/572d9b46a6dd4284970670bf2ca3acfb to your computer and use it in GitHub Desktop.
Save itaysk/572d9b46a6dd4284970670bf2ca3acfb to your computer and use it in GitHub Desktop.
Kubernetes Pod Conditions
kubectl get po mypod -ojson | jq '.status.conditions[] | select(.type=="mycondition") | .status' -r
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