1V0-71.21 · Question #30
1V0-71.21 Question #30: Real Exam Question with Answer & Explanation
The correct answer is B. kubectl apply. kubectl apply is the canonical declarative command - you describe the desired state in a YAML/JSON manifest and Kubernetes figures out what changes are needed to reach that state, creating or updating resources as required. Why the others are wrong: A. kubectl manage - this comma
Question
Options
- Akubectl manage
- Bkubectl apply
- Ckubectl create
- Dkubectl patch
Explanation
kubectl apply is the canonical declarative command - you describe the desired state in a YAML/JSON manifest and Kubernetes figures out what changes are needed to reach that state, creating or updating resources as required.
Why the others are wrong:
- A.
kubectl manage- this command does not exist in kubectl. - C.
kubectl create- this is imperative; it creates a resource from scratch but fails if it already exists, and it doesn't reconcile against a desired state file. - D.
kubectl patch- also imperative; it directly modifies a specific field on an existing resource rather than applying a full desired-state definition.
Memory tip: Think "Apply = Aim" - you aim at a desired end-state and let Kubernetes close the gap. Imperative commands (create, delete, patch) tell Kubernetes what to do; declarative apply tells it what you want.
Topics
Community Discussion
No community discussion yet for this question.