Correct Answer: kubectl apply -f app.yaml
'kubectl apply -f' is the declarative way to create or update resources based on a configuration file....
Correct Answer
kubectl apply -f app.yaml
Why This Answer Is Correct
'kubectl apply -f' is the declarative way to create or update resources based on a configuration file.
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?
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 want to quickly create a YAML template for a deployment named 'nginx' without actually creating the resource in the cluster. Which combination of kubectl flags should you use?
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?