Bird
0
0

You applied a Deployment YAML but no pods are created. Which issue is most likely causing this?

medium📝 Troubleshoot Q14 of 15
Kubernetes - ReplicaSets and Deployments
You applied a Deployment YAML but no pods are created. Which issue is most likely causing this?
AThe Deployment metadata name is missing
BThe Deployment selector labels do not match the pod template labels
CThe replicas field is set to zero
DThe container image name is missing
Step-by-Step Solution
Solution:
  1. Step 1: Understand Deployment selector importance

    The Deployment uses the selector to find pods it manages. If selector labels don't match pod template labels, no pods are created.
  2. Step 2: Evaluate other options

    Missing image name causes pod creation failure but usually with errors. Replicas zero means no pods but is explicit. Missing metadata name causes YAML validation error.
  3. Final Answer:

    The Deployment selector labels do not match the pod template labels -> Option B
  4. Quick Check:

    Selector-template label mismatch = no pods [OK]
Quick Trick: Check selector and template labels match exactly [OK]
Common Mistakes:
  • Ignoring label mismatch
  • Assuming missing image silently creates no pods
  • Confusing replicas zero with label mismatch

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes