Kustomize with kubectl
Kustomize is built into kubectl, which makes it the one packaging tool guaranteed to be available on the exam. It layers changes over unmodified YAML - no placeholders, no template language - so the base stays a manifest you can apply on its own. A base and one overlay are built here, rendered locally first, and then applied with a single flag.
Application Deployment Guide 20 of 44 Intermediate
- Kubernetes1.36.4
- Cluster4 nodes
- Runtimecontainerd 2.2.6
- CNICalico v3.32.1
- TimeAbout 15 min
commonLabels is deprecated in favour of labels, and the captured output warns about it twice. The reason to care is not tidiness: commonLabels injects into spec.selector as well as the metadata, and a Deployment's selector is immutable - so adding a common label to an existing Deployment later fails. labels: with includeSelectors: false does not have that problem.
| 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 the same manifests have to reach several environments and you cannot install anything. This matters because Kustomize is built into kubectl, which makes it the one packaging tool guaranteed to be available to you in an exam.
- writing a base that is an ordinary manifest plus a kustomization file
- layering an overlay that changes several things without touching the base
- applying it with
-k, which takes a directory where-ftakes a file - confirming the base is genuinely unchanged afterwards
Before you start
- kubectl 1.14 or newer - Kustomize has been built in since then. Nothing to install.
- The session writes a base and a
prodoverlay under/tmp/kz, renders both, applies the overlay into namespaceckad-kz, and confirms the base is unchanged.
-
A base that is just a manifest
-
An overlay that changes four things
-
Apply it with one flag
-
The base never changed