juniorKubernetes
Explain the purpose of a Service.
Updated Apr 28, 2026
Short answer
An abstraction that defines a logical set of Pods and a policy by which to access them, providing a stable IP.
Deep explanation
Kubernetes provides a framework to run distributed systems resiliently. It handles scaling and failover for your application, provides deployment patterns, and more. It operates on a declarative model where you define the 'desired state' and K8s works to maintain it.
Real-world example
Managing a web application where you need 3 copies running at all times for high availability.
Common mistakes
- Thinking a Pod is a permanent resource
- Pods are ephemeral and can be destroyed/recreated at any time.
Follow-up questions
- How do you check the logs of a Pod?