Bird
0
0

Which kubectl command provides real-time metrics for CPU and memory usage of pods in a Kubernetes cluster?

easy📝 Syntax Q3 of 15
Kubernetes - Monitoring and Logging
Which kubectl command provides real-time metrics for CPU and memory usage of pods in a Kubernetes cluster?
Akubectl top pods
Bkubectl describe pods
Ckubectl get pods --metrics
Dkubectl logs pods
Step-by-Step Solution
Solution:
  1. Step 1: Identify the command for metrics

    The kubectl top command is used to fetch resource usage metrics.
  2. Step 2: Differentiate pods vs nodes

    kubectl top pods shows metrics for pods, while kubectl top nodes shows node metrics.
  3. Final Answer:

    kubectl top pods -> Option A
  4. Quick Check:

    Command for pod metrics is kubectl top pods [OK]
Quick Trick: Use 'kubectl top pods' for pod CPU/memory metrics [OK]
Common Mistakes:
  • Confusing 'kubectl describe' with metrics commands
  • Using 'kubectl logs' to check resource usage
  • Assuming 'kubectl get pods --metrics' is valid

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes