This lab simulates a common CKA/CKAD style troubleshooting task where you must repair a Helm chart, modify chart values, and deploy the application according to stated requirements.
Deploy the broken Helm chart located under:
/opt/webapp-color-apd
Requirements:
ssh cluster2-controlplane
Always read the question carefully. Many exam candidates lose points because they make changes on the wrong node.
kubectl get ns
Look for:
frontend-apd
If it does not exist, create it:
kubectl create namespace frontend-apd
cd /opt ls tree webapp-color-apd
You should see something similar to:
webapp-color-apd/
├── Chart.yaml
├── values.yaml
└── templates
├── deployment.yaml
├── service.yaml
└── ...
A Helm chart is essentially a collection of Kubernetes manifests that use template variables. These variables are populated from values.yaml.
Edit the chart file:
vim /opt/webapp-color-apd/Chart.yaml
Locate:
appVersion:
Update it to:
appVersion: "1.20.0"
Why?
The task explicitly requires the application version to be 1.20.0. This setting is stored inside Chart.yaml rather than values.yaml.
vim /opt/webapp-color-apd/values.yaml
Find:
replicaCount: 1
Change to:
replicaCount: 3
Find:
service: type: ClusterIP
Change to:
service: type: NodePort
The deployment template uses replicaCount and the service template uses service.type.
helm lint /opt/webapp-color-apd/
Linting checks for chart problems before deployment.
Successful output:
==> Linting /opt/webapp-color-apd [INFO] Chart.yaml: icon is recommended 1 chart(s) linted, 0 chart(s) failed
The deployment template contains an invalid API version.
Open:
vim /opt/webapp-color-apd/templates/deployment.yaml
Incorrect:
apiVersion: app/v1
Correct:
apiVersion: apps/v1
Open:
vim /opt/webapp-color-apd/templates/service.yaml
You may find something similar to:
{{ .Value.service.name }}
or another typo in the values reference.
Correct Helm expression:
{{ .Values.service.name }}
Helm is case-sensitive. A single missing letter can cause rendering failures.
helm lint /opt/webapp-color-apd/
Expected:
1 chart(s) linted, 0 chart(s) failed
Do not skip linting. It catches problems much faster than repeated install attempts.
helm install webapp-color-apd \ -n frontend-apd \ /opt/webapp-color-apd
Expected output:
NAME: webapp-color-apd LAST DEPLOYED: ... NAMESPACE: frontend-apd STATUS: deployed REVISION: 1
helm ls -n frontend-apd
Expected:
NAME NAMESPACE REVISION webapp-color-apd frontend-apd 1
kubectl get deploy -n frontend-apd
kubectl get pods -n frontend-apd
kubectl get svc -n frontend-apd
Verify:
kubectl get ns
kubectl create ns frontend-apd
vim Chart.yaml
appVersion: "1.20.0"
vim values.yaml
replicaCount: 3
service.type: NodePort
helm lint .
fix deployment.yaml
apiVersion: apps/v1
fix service.yaml
{{ .Values.service.name }}
helm lint .
helm install webapp-color-apd \
-n frontend-apd .
helm ls -n frontend-apd
kubectl get all -n frontend-apd