Complete the code to check if a Pod is in the Running state.
kubectl get pod my-pod -o jsonpath='{.status.phase}' | grep [1]
The Pod phase 'Running' means the Pod is active and containers are running.
Complete the command to list Pods that are in the Pending state.
kubectl get pods --field-selector status.phase=[1]The field-selector filters Pods by their phase. 'Pending' shows Pods waiting to start.
Fix the error in the command to get the Pod phase correctly.
kubectl get pod my-pod -o jsonpath='{.status.[1]'
The correct JSON path key for Pod lifecycle state is 'phase'.
Fill both blanks to create a command that lists Pods in Running or Succeeded states.
kubectl get pods --field-selector='status.phase in ([1],[2])'
This command filters Pods that are either Running or have Succeeded.
Fill all three blanks to create a command that watches Pods entering Running state with a label.
kubectl get pods -l app=[1] --field-selector status.phase=[2] --watch=[3]
This command watches Pods labeled 'frontend' as they enter the Running phase.
