Assignment 2: Package your app as a chart
Goal: turn the app you deployed in Module 7 into your own reusable Helm chart — templated, linted, installed, and upgradeable.
Tasks
- Scaffold a chart with
helm create, then trim it to the essentials (Chart.yaml, values.yaml, a Deployment and Service template,_helpers.tpl, NOTES.txt). - Make these things configurable via
values.yaml: image repository + tag, replica count, service type and port. Point the image at your Module 6 image in the lab registry. - Template the Deployment and Service to read those values (use the
_helpers.tplnaming/label snippets). - Run the author's loop:
helm lintclean →helm templateand read the output →helm installinto your namespace →kubectl get allshows it Ready. - Change a value (e.g. replicas 2 → 3) and
helm upgrade; confirm the change took effect. Bump the chartversioninChart.yamlfor the change. helm packagethe chart into a versioned.tgz. (Optional stretch: push it to the lab registry as an OCI chart.)
Deliverable
Your chart directory (committed to Gitea — Module 4), plus a short note with: your values.yaml, the helm lint result, a snippet of helm template output showing values substituted in, and kubectl get all proving it ran. Include the produced .tgz filename.
Acceptance criteria — you're done when:
-
helm lint ./<chart>passes with no errors. -
helm templateoutput shows yourvalues.yamlvalues actually substituted (image, replicas, port) — not placeholders. -
helm installproduced a running release;kubectl get all -n <your-ns>shows Ready Pods and a Service. - A
helm upgradechanged a value live, and you bumpedChart.yamlversionfor it. -
helm packageproduced<chart>-<version>.tgz, and the chart is committed to Gitea. - Nothing that should be configurable is hardcoded in the templates (image tag, replicas, port all come from values).
Hints
helm create,helm lint,helm template,helm install,helm upgrade,helm package;kubectl get all -n <ns>.- Reuse the Deployment/Service shapes from Module 7 — you're templating manifests you already understand.
- Remember
nindentfor blocks pulled in from_helpers.tpl. - Blocked for >~30 min after re-reading the lessons? Bring what you've tried to your mentor.