Pod
In one line
A Pod is the smallest unit in Kubernetes that can be created and deployed, containing one or more containers.
In simple words
A Pod is the basic building block of Kubernetes. It is the smallest unit that Kubernetes can manage. A Pod contains one or more containers that share the same network and storage.
Most commonly, a Pod contains just a single container. But sometimes you might have a Pod with multiple containers that work closely together — for example, a web server container and a sidecar container that logs its output.
Think of a Pod as a single "instance" of your application. When you scale up, Kubernetes creates more Pods. When a Pod dies, Kubernetes creates a new one to replace it. Pods are ephemeral — they are created and destroyed, not updated in place.
Example
apiVersion: v1
kind: Pod
metadata:
name: my-pod
spec:
containers:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80This defines a single Pod running an nginx container listening on port 80.
How it works
- You define a Pod (usually via a Deployment) in YAML.
- Kubernetes schedules the Pod onto a node with available resources.
- The Pod's containers start and share the same network namespace.
- If the Pod's main container exits, the Pod is considered failed.
Common confusions
Confused with: Container
The difference: A container is a Docker concept; a Pod is a Kubernetes wrapper that can hold one or more containers sharing network and storage.
Related terms
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.