Explain the relationship between a Pod, a Deployment, and a Service in Kubernetes.
What they are really testing: The core mental model. They want to hear that pods are disposable and that the other two objects exist precisely because of that, rather than three isolated definitions.
A real interview question
Explain the relationship between a Pod, a Deployment, and a Service in Kubernetes.
What most people say
drag me
“A Pod runs containers, a Deployment creates pods, and a Service exposes them.”
It is three definitions with no relationship between them. It misses why the other objects need to exist, which is that pods are ephemeral and their IPs change on every restart.
The follow-ups they ask next
Traffic to a Service returns nothing but the pods are Running. Where do you look?
Check the endpoints object first: empty endpoints means the selector does not match pod labels, or the readiness probe is failing so pods are excluded from the service.
When would you use a StatefulSet instead of a Deployment?
When identity matters: stable network names and stable per-pod storage, with ordered startup and shutdown. Databases and clustered systems like Kafka need it.
What the interviewer is listening for
- Leads with pods being disposable
- Explains labels as the glue
- Knows readiness affects service membership
What sinks the answer
- Three disconnected definitions
- Thinks pods are long-lived
- Cannot explain why a Service is needed at all
If you genuinely do not know
Say this instead of freezing. Reasoning out loud from what you do know beats silence every single time, and a good interviewer is listening for exactly that.
“A Pod is [the disposable unit that runs containers, with an IP that changes]. A Deployment [keeps the right number running and handles rolling updates]. A Service [gives one stable name and load balances across matching pods]. They connect via [label selectors].”
Keep going with kubernetes
Junior
What is the difference between a liveness probe and a readiness probe, and what happens if you configure them wrong?
Mid
How do you decide CPU and memory requests and limits for a service, and what breaks if you get them wrong?
Senior
Four teams want to share one Kubernetes cluster. How do you isolate them, and when would you give them separate clusters instead?
Junior
Design the pipeline for a typical web application. What stages would you have, and in what order?
Junior
Our Docker image is 1.2 GB and takes 8 minutes to build. How would you make it smaller and faster?
Junior
What is Terraform state, why does it exist, and what goes wrong if two people apply at the same time?
Knowing the answer is not the same as recalling it under pressure
Sign in to send the questions you fumble to spaced recall, so they come back right before you would forget them, and learn the concepts behind them with hands-on labs.
Start free