Skip to content

Pods: Architecture & Lifecycle

A Pod is the smallest deployable computing unit in Kubernetes. A Pod encapsulates one or more containers that share storage, network IP address, and runtime specifications.


┌─────────┐ ┌─────────┐ ┌─────────┐ ┌───────────┐
│ Pending │ ───► │ Running │ ───► │Succeeded│ OR │ Failed │
└─────────┘ └─────────┘ └─────────┘ └───────────┘
  • Pending: The Pod has been accepted by the API Server, but one or more containers have not been scheduled or images are still downloading.
  • Running: Bound to a node, all containers have been created, and at least one container is currently executing or restarting.
  • Succeeded: All containers in the Pod terminated successfully with exit code 0.
  • Failed: All containers have terminated, and at least one container exited with a non-zero exit status.
  • Unknown: The state of the Pod cannot be obtained, typically due to network communication failure with the host Kubelet.

apiVersion: v1
kind: Pod
metadata:
name: nginx-pod
labels:
app: web
spec:
containers:
- name: nginx
image: nginx:1.25-alpine
ports:
- containerPort: 80
resources:
requests:
memory: "64Mi"
cpu: "100m"
limits:
memory: "128Mi"
cpu: "250m"