Kubernetes is a declarative control plane that manages the lifecycle of containerized workloads. It abstracts physical infrastructure into a set of logical primitives: Pods, Services, and Deployments.
A Pod is the smallest deployable unit. It groups one or more containers that share a network namespace (localhost) and storage volumes.
The Pod's shared network namespace enables the Sidecar Pattern, where auxiliary tasks (logging, service mesh proxying, secret rotation) are decoupled from the primary application container.
Technical Constraint: All containers in a Pod share a single IP. Port conflicts must be managed at the container level within the Pod.
A Deployment manages the desired state of a set of Pods. It is a high-level abstraction over ReplicaSets.
When a Deployment is updated (e.g., new image version), the Deployment Controller:
Rollback Strategy: If RS_{new} fails health checks, the controller can be instructed to revert to RS_{old} immediately, leveraging the immutable history of ReplicaSet revisions.
Pods are ephemeral; their IPs change on every restart. A Service provides a stable virtual IP (ClusterIP) and DNS name for a set of Pods.
kube-proxy runs on every node and manages the mapping from the Service IP to the healthy Pod IPs using:
Kubernetes relies on three probe types to manage the "Self-Healing" loop:
Resource requests and limits define the Pod's Quality of Service (QoS):
| Component | Responsibility | Failure Mode |
|---|---|---|
| Pod | Execution & Co-location | Ephemeral; dies with the Node. |
| Service | Stable Networking | Points to old IPs if selector is wrong. |
| Deployment | Versioning & Scaling | Rollout stall if probes never pass. |
| ConfigMap/Secret | State & Configuration | Stale data if application doesn't watch for updates. |