A Pod Is the Unit Kubernetes Schedules, and Each Pod Gets an IP from the Pod CIDR
Kubernetes manages containerized applications across a group of machines: it decides where each part runs, restarts what crashes and keeps the pieces coordinated. Its smallest schedulable unit is not a container but a pod, one or more containers that share a network namespace and volumes. Every pod gets its own IP from the cluster's pod CIDR, so pods talk to each other directly, whatever node they run on.
Nodes: Control Plane and Workers
| Role | Does |
|---|---|
| Control plane | the API server, the scheduler, controllers, and etcd storing the cluster state |
| Worker | runs pods through the kubelet and the container runtime |
A node that joins is NotReady until a CNI plugin gives it a pod network (see containerd Looks for CNI Plugins in One Directory, So a Path Mismatch Blocks Pod Networking).
Pods
- Containers in the same pod share
localhostand can share volumes: use it for tightly coupled helpers (a sidecar that ships logs), not for unrelated apps. - Pods are disposable: a Deployment replaces a failed pod with a new one, with a new IP.
The Pod CIDR
A CIDR block is an IP range written as address and prefix length: 10.244.0.0/16 holds 65,536 addresses. The cluster's pod CIDR is set at kubeadm init --pod-network-cidr, split into one subnet per node, and handed out by the CNI. It must not overlap the physical network (192.168.1.0/24 at home), or traffic to one of the two gets misrouted.
References
- Kubernetes MOC - hub for Kubernetes notes.
- Kubernetes documentation: Pods - pods and shared namespaces.
- Kubernetes documentation: Cluster Architecture - control plane and node components.
Review cards
Flashcard Why must the pod CIDR not overlap the home network (`192.168.1.0/24`)?
The same addresses would exist on both networks, so traffic meant for one is routed to the other. It's set once, at kubeadm init --pod-network-cidr.
Quiz What is the smallest unit Kubernetes schedules, and where does its IP come from?
- A pod, with an IP from the cluster's pod CIDR
- A container, with an IP from the node's LAN
- A pod, sharing the node's LAN IP
- A container, with an IP from the pod CIDR
Kubernetes schedules pods, not containers. The CNI gives each pod an address from its node's slice of the pod CIDR, so pods talk to each other directly across nodes.