Interactive Lab ยท CKA ยท Feb 2025 Update

HELM & KUSTOMIZE

$ helm install my-app ./chart --values prod-values.yaml
⎈ Helm The Kubernetes package manager
  • 1Helm packages Kubernetes manifests into charts. A chart is templates + a values file. You install a chart as a release.
  • 2Charts use Go templating. {{ .Values.image.tag }} gets replaced with the value from values.yaml or a --set flag.
  • 3Helm tracks releases and supports rollback. helm rollback my-app 1 reverts to revision 1.
⚠ Added to the CKA in February 2025. Know helm install, upgrade, rollback and template cold.
Helm chart structure
# A Helm chart directory: my-chart/ Chart.yaml # chart name and version values.yaml # default values templates/ # manifests with Go template placeholders deployment.yaml service.yaml # Template example in deployment.yaml: image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
🛠 Key Helm commands for the exam
  • 1helm install deploys a chart. helm upgrade updates a release. helm upgrade --install does both idempotently.
  • 2helm list shows all releases. helm history shows revision history. helm rollback reverts.
  • 3helm template renders templates without installing. Use this to inspect what will be applied.
Helm command reference
# Install helm install my-release ./chart --values prod.yaml -n production # Upgrade (or install if not exists) helm upgrade --install my-release ./chart --set image.tag=v2.0 # List all releases helm list -A # See history and rollback helm history my-release helm rollback my-release 1 # Render without installing helm template my-release ./chart --values prod.yaml
🔧 Kustomize Patch without templates
  • 1Kustomize customizes Kubernetes manifests without templating. You have a base and per-environment overlays. No special syntax, just patches.
  • 2Built into kubectl since v1.14. Use kubectl apply -k ./dir or kubectl kustomize ./dir to preview.
  • 3Common uses: different image tags per environment, different replica counts, add labels or annotations on top of a shared base.
Kustomize structure and overlay
# Directory structure: base/ kustomization.yaml # lists resources deployment.yaml overlays/production/ kustomization.yaml # patches to apply on top of base patch.yaml # overlays/production/kustomization.yaml: bases: - ../../base images: - name: myapp newTag: v2.0.0 # Apply the overlay: kubectl apply -k ./overlays/production
Helm
helm installDeploy a chart as a new release
helm upgrade --installInstall or upgrade idempotently
helm list -AAll releases in all namespaces
helm rollbackRevert to a previous revision
helm templateRender manifests without applying
Kustomize
kubectl apply -kApply a kustomize directory
kubectl kustomizePreview rendered manifests
kustomization.yamlLists resources and patches
images.newTagOverride image tag per overlay
Done