Correct Answer: kubectl run dns-test --image=busybox -n staging -it --rm -- sh
'kubectl run' runs a pod. The '-it' flags make it interactive, '--rm' ensures the pod is deleted automatically when it terminates, and '-- sh' runs the shell command inside the con...
Correct Answer
kubectl run dns-test --image=busybox -n staging -it --rm -- sh
Why This Answer Is Correct
'kubectl run' runs a pod. The '-it' flags make it interactive, '--rm' ensures the pod is deleted automatically when it terminates, and '-- sh' runs the shell command inside the container.
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 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?