You applied a ReplicaSet YAML but no pods are created. Which of these is the most likely cause?
medium📝 Troubleshoot Q14 of 15
Kubernetes - ReplicaSets and Deployments
You applied a ReplicaSet YAML but no pods are created. Which of these is the most likely cause?
AThe replicas field is set to 0
BThe selector labels do not match the pod template labels
CThe container image name is misspelled
DThe ReplicaSet name is missing
Step-by-Step Solution
Solution:
Step 1: Understand pod creation depends on selector matching template labels
If selector labels don't match pod template labels, ReplicaSet won't manage any pods.
Step 2: Evaluate other options
Replicas 0 means no pods, but question says pods expected. Misspelled image causes pod crash, not zero pods. Name missing causes YAML error, not silent no pods.
Final Answer:
The selector labels do not match the pod template labels -> Option B
Quick Check:
Selector-template label mismatch = no pods [OK]
Quick Trick:Selector and template labels must match exactly [OK]
Common Mistakes:
Assuming image typo prevents pod creation
Ignoring selector-template label mismatch
Thinking ReplicaSet name is optional
Master "ReplicaSets and Deployments" in Kubernetes
9 interactive learning modes - each teaches the same concept differently