Hands-on Lab·Certified Kubernetes Administrator
Init Containers and Startup Order
Init containers run to completion, one at a time, before any app container starts. Use two of them to prepare a file and impose a delay, watch the Pod sit in Init while they work, and see the app container read what the first one wrote.
Workloads Guide 31 of 103 Beginner
- Kubernetes1.36.4
- Cluster4 nodes
- Runtimecontainerd 2.2.6
- CNICalico v3.32.1
- TimeAbout 25 min
- Reviewed21 August 2026
Written against the versions above. Timings depend on how quickly images are already cached on the node.
| 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 |
Before you start
- A working cluster and
kubectl. - The Pods guide, particularly the multi-container section: init containers share volumes the same way sidecars do.
- Nothing else.
-
Two init containers and an app that depends on them
-
Wait for them, then read each log separately
-
Init containers are Completed, not Running
-
Clean up