Correct Answer: --dry-run=client -o yaml
Combining '--dry-run=client' (which runs the command locally without contacting the API server) and '-o yaml' prints the resource definition in YAML format....
Correct Answer
--dry-run=client -o yaml
Why This Answer Is Correct
Combining '--dry-run=client' (which runs the command locally without contacting the API server) and '-o yaml' prints the resource definition in YAML format.
This question evaluates your knowledge of Kubernetes CLI — a core concept tested in cloud certification exams. Understanding Kubernetes CLI is essential for designing scalable, secure, and cost-effective cloud architectures. Mastery of this topic will help you answer scenario-based questions confidently on exam day.
How do you rollback a Kubernetes Deployment named 'web-app' to the directly preceding revision?
Which command applies a configuration file named 'app.yaml' to a Kubernetes cluster?
You want to inspect the real-time logs of a running container named 'app-container' within a pod named 'web-pod'. Which kubectl command should you run?
You are debugging a connection issue and want to run a temporary diagnostic container using the 'busybox' image inside the namespace 'staging', interact with its shell, and have the container be automatically deleted as soon as you exit the shell. Which command should you run?