Certified Kubernetes Application Developer (CKAD) · Free practice question 7 of 12
Watching Pod status changes live
A developer at Porthleven Bakery has just applied a Deployment and wants to see Pods move through ContainerCreating to Running in the terminal as it happens, without rerunning the command. Which command fits?
- A.kubectl get pods -l app=bakery -w
- B.kubectl describe pods -l app=bakery --tail
- C.kubectl get pods -l app=bakery --sort-by=status
- D.kubectl top pods -l app=bakery --follow
Show answer and explanation
Correct answer: A. kubectl get pods -l app=bakery -w
Why: The -w (--watch) flag keeps kubectl get open and prints a new line each time a matching Pod changes. --sort-by only orders a single listing, describe has no --tail option, and kubectl top shows usage metrics and has no --follow flag.
More free Certified Kubernetes Application Developer (CKAD) questions
- Generating a Pod manifest skeleton
- Downward API Pod IP as env
- fsGroup for shared volume ownership
- Indexed Job completion index
- Pulling and unpacking a chart locally
- Kustomize namePrefix and references
- tcpSocket probe for a non-HTTP server
- ExternalName Service for an outside host
- StatefulSet per-Pod DNS name
- Ways to consume a Secret in a container
- Checking quota usage in a namespace