Bird
0
0

Which of the following is the correct command to check the desired and actual replicas of a Deployment named webapp?

easy📝 Syntax Q3 of 15
Kubernetes - ReplicaSets and Deployments
Which of the following is the correct command to check the desired and actual replicas of a Deployment named webapp?
Akubectl get pods webapp
Bkubectl describe pod webapp
Ckubectl get deployment webapp
Dkubectl logs deployment webapp
Step-by-Step Solution
Solution:
  1. Step 1: Identify command to get Deployment info

    The command kubectl get deployment webapp shows desired and actual replicas.
  2. Step 2: Verify other options

    kubectl describe pod and kubectl get pods show Pod info, not Deployment summary. kubectl logs shows logs, not replica counts.
  3. Final Answer:

    kubectl get deployment webapp -> Option C
  4. Quick Check:

    Use kubectl get deployment for replicas info [OK]
Quick Trick: Use kubectl get deployment to see replicas [OK]
Common Mistakes:
  • Using pod commands instead of deployment commands
  • Trying to get replicas from logs
  • Confusing describe pod with describe deployment

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes