Kubernetes
Easy
Commands
Which kubectl command would you use to view all pods in all namespaces?
Select your answer:
Show answer and explanation
Answer: kubectl get pods --all-namespaces
Explanation
The 'kubectl get pods --all-namespaces' command (or the shorter form 'kubectl get pods -A') lists all pods across all namespaces in the cluster, providing a cluster-wide view of running pods.
More easy Kubernetes questions
- Which command would you use to create a new namespace called 'development'?
- Which kubectl command would you use to edit a running deployment named 'web-app'?
- What is the purpose of a Kubernetes Secret?
- Which kubectl command would you use to view the resource usage of pods?
- What happens when you apply a resource that already exists in the cluster?
- Which command would you use to get the YAML definition of a running pod named 'web-app'?