Helm Troubleshooting Lab - webapp-color-apd

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.


Objective

Deploy the broken Helm chart located under:

/opt/webapp-color-apd

Requirements:


Step 1 - SSH to the Correct Node

ssh cluster2-controlplane

Always read the question carefully. Many exam candidates lose points because they make changes on the wrong node.

Step 2 - Verify Namespace Exists

kubectl get ns

Look for:

frontend-apd

If it does not exist, create it:

kubectl create namespace frontend-apd
Exam Tip: Helm installation will fail if the target namespace does not exist. This is one of the most common mistakes during timed exams.

Step 3 - Explore the Helm Chart

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.

Step 4 - Update Chart.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.

Step 5 - Update values.yaml

vim /opt/webapp-color-apd/values.yaml

Change Replica Count

Find:

replicaCount: 1

Change to:

replicaCount: 3

Change Service Type

Find:

service:
  type: ClusterIP

Change to:

service:
  type: NodePort

The deployment template uses replicaCount and the service template uses service.type.

Step 6 - Run Helm Lint

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

Step 7 - Fix Deployment Template

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
Deployment resources always use apps/v1 on modern Kubernetes clusters.

Step 8 - Fix Service Template

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.

Always look for:
  • .Value instead of .Values
  • replicaCount misspellings
  • service.name typos
  • missing braces {{ }}
  • bad YAML indentation

Step 9 - Validate Again

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.

Step 10 - Install the Chart

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

Step 11 - Verify Release

helm ls -n frontend-apd

Expected:

NAME               NAMESPACE      REVISION
webapp-color-apd   frontend-apd   1

Step 12 - Verify Kubernetes Resources

Deployments

kubectl get deploy -n frontend-apd

Pods

kubectl get pods -n frontend-apd

Services

kubectl get svc -n frontend-apd

Verify:

Quick Exam Workflow

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
✅ Final Checklist