Concepts·Certified Kubernetes Administrator
Pods: The Basic Deployment Unit
Kubernetes does not run containers, it runs Pods. Write one as YAML, see what the API server fills in that you did not, put two containers in one Pod and prove they share an address and a volume, then watch what happens when you delete it.
Foundations Guide 4 of 103 Beginner
- Kubernetes1.36.4
- Cluster4 nodes
- Runtimecontainerd 2.2.6
- CNICalico v3.32.1
- TimeAbout 30 min
UIDs, resourceVersions, timestamps and pod addresses are generated per run. The manifests are the part to copy.
| Server Name | IP Address | OS | Roles | CPU | RAM | HDD |
|---|---|---|---|---|---|---|
| CKA1001 | 192.168.0.175 | Ubuntu 26.04 LTS | Control Plane Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE01 | 192.168.0.176 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE02 | 192.168.0.177 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
| CKA1001-NODE03 | 192.168.0.178 | Ubuntu 26.04 LTS | Worker Node | 2 Core | 4 GB | 50 GB |
This guide includes
Use this when you are moving from containers to Kubernetes and need to know what a Pod adds. This matters because Kubernetes does not run containers, it runs Pods - and the network and storage shared inside one is the whole reason the abstraction exists.
- creating a Pod with
kubectl runand reading back everything the API server filled in - writing the manifest yourself instead, and labelling it so Services and controllers can find it
- running two containers in one Pod and proving they share a volume, with
readOnlyenforced - confirming the Pod has one address that both containers share
- deleting a bare Pod and finding that nothing brings it back
Before you start
- A working cluster and
kubectlconfigured against it. - Any container experience helps, but is not required. If you know
docker run, the interesting part is what Kubernetes adds around it. - A scratch namespace if you are on a shared cluster. Everything here runs in
defaultand is deleted at the end.
-
The smallest thing you can run
-
See what the API server added
-
Write the manifest yourself
-
Labels are the addressing system
-
Two containers, one Pod
-
Prove they share the volume, and that readOnly means it
-
One address for the whole Pod
-
A bare Pod does not come back
-
Clean up