Kubernetes
Easy
Commands
Which kubectl command would you use to view the resource usage of pods?
Select your answer:
Show answer and explanation
Answer: kubectl top pods
Explanation
The 'kubectl top pods' command displays the resource usage (CPU/memory) of pods. This requires the Metrics Server to be deployed in your cluster to collect and provide this data.
More easy Kubernetes questions
- 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'?
- What is the purpose of the 'kubectl port-forward' command?
- What happens to a pod's data when it is deleted?
- Which command would you use to view events in a Kubernetes cluster?
- Which kubectl command would you use to view the current context?