Skip to content

Instantly share code, notes, and snippets.

@itaysk

itaysk/get-kubectl-jq.sh

Last active Mar 27, 2019
Embed
What would you like to do?
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
You can’t perform that action at this time.