Conditions — status indicators for Pod state.
1apiVersion: v12kind: Pod3metadata:4 name: my-pod5spec:6 containers:7 - name: app8 image: nginx:latest9 startupProbe:10 httpGet:11 path: /healthz12 port: 808013 failureThreshold: 3014 periodSeconds: 1015 readinessProbe:16 httpGet:17 path: /ready18 port: 808019 initialDelaySeconds: 520 periodSeconds: 1021 livenessProbe:22 httpGet:23 path: /healthz24 port: 808025 initialDelaySeconds: 1526 periodSeconds: 20
1# Check Pod conditions2kubectl get pod my-pod -o jsonpath='{.status.conditions}' | jq34# Check specific condition5kubectl get pod my-pod -o jsonpath='{.status.conditions[?(@.type=="Ready")].status}'6kubectl get pod my-pod -o jsonpath='{.status.conditions[?(@.type=="PodScheduled")].status}'7kubectl get pod my-pod -o jsonpath='{.status.conditions[?(@.type=="ContainersReady")].status}'8kubectl get pod my-pod -o jsonpath='{.status.conditions[?(@.type=="Initialized")].status}'910# Check all conditions11kubectl get pod my-pod -o json | jq '.status.conditions[] | {type: .type, status: .status, reason: .reason, message: .message}'1213# Watch condition changes14kubectl get pod my-pod -w15kubectl get events --field-selector involvedObject.name=my-pod1617# Check container status18kubectl get pod my-pod -o jsonpath='{.status.containerStatuses}' | jq
Conditions:
Status Values: