JSONPath on any resource k8s-debug
Extract specific fields from k8s API objects without jq
kubectl get pods -A -o jsonpath='{range .items[*]}{.metadata.namespace}\t{.metadata.name}\t{.status.phase}\n{end}'
more k8s-debug
all 27 commands →
Debug pod with ephemeral container
kubectl debug -it mypod --image=busybox --target=app
Run debug pod on node
kubectl debug node/my-node -it --image=ubuntu
Exec into sidecar container
kubectl exec -it mypod -c sidecar-name -- /bin/sh
Check resource requests/limits
kubectl get pod mypod -o jsonpath='{range .spec.containers[*]}{.name}{"\t"}{.resources}{"\n"}{end}'
Describe node conditions
kubectl describe node my-node | grep -A5 'Conditions:'