Kubernetes Pods
What is a Pod?
A Pod is the smallest deployable unit in Kubernetes. It represents a single instance of a running process in your cluster. A Pod encapsulates one or more containers (such as Docker containers), storage resources, a unique network IP, and options that govern how the containers should run.
Think of a Pod as a "logical host" for your application container. While most Pods contain a single container, some designs use multiple containers that need to share resources tightly — for example, a web server container paired with a sidecar that collects logs.
Container Specification
Each container in a Pod is defined with a specification that includes:
- image — The container image to run (e.g.,
nginx:latest) - ports — Network ports the container exposes
- env — Environment variables to set inside the container
- resources — CPU and memory limits/requests
- volumeMounts — Paths where volumes are mounted into the container
Pod Manifest Example
Here is a basic Pod manifest in YAML:
apiVersion: v1
kind: Pod
metadata:
name: my-first-pod
labels:
app: my-app
spec:
containers:
- name: web
image: nginx:1.25
ports:
- containerPort: 80
Key fields to understand:
apiVersion: v1— The Kubernetes API version for this resource.kind: Pod— The type of resource being created.metadata.name— A unique name for the Pod within its namespace.spec.containers— A list of containers that run inside the Pod.containers[].image— The container image to pull and run.containers[].ports— Ports the container listens on.
Rebel Training: Pods
Convoy Sigma's Life Pods keep your crew alive during a UTA ambush. Master their blueprints, deployment, and emergency repairs across four tiers of difficulty.
T1 — Recall
T2 — Build
T3 — Order
T4 — Debug
localhost. They also share IPC and can mount the same volumes — this is why the sidecar pattern (log shippers, proxies, watchers) is so powerful in Kubernetes.