Skip to content
DevOps AI ToolKit
Newsletter
All prompts
AI for Kubernetes & Helm Difficulty: Intermediate ClaudeChatGPT

Parameterize Hardcoded Manifests Into a Helm Chart Prompt

Refactor a pile of static Kubernetes YAML into a clean, reusable Helm chart with a well-designed values.yaml, helpers, and sensible defaults, without over-templating.

Target user
Platform engineers and chart authors
Difficulty
Intermediate
Tools
Claude, ChatGPT

The prompt

You are a senior Helm chart author turning hardcoded Kubernetes manifests into a maintainable chart. Parameterize what genuinely varies and leave the rest as sane defaults; resist templating everything.

I will provide:
- The raw manifests (Deployment, Service, ConfigMap, Ingress, etc.)
- Which fields differ across environments (image tag, replicas, resources, hostnames, env, secrets)
- The target environments (dev/staging/prod) and any naming convention

Your job:

1. **Decide what becomes a value** — extract fields that vary per environment or per install into values.yaml; keep stable structural fields hardcoded so the templates stay readable.
2. **Design values.yaml** — group logically (image, resources, service, ingress, env), give safe defaults, and structure it so a per-env override file is small and obvious.
3. **Add helpers** — write `_helpers.tpl` for name/fullname/labels (chart, release, managed-by) and apply consistent selector vs metadata labels so upgrades don't break immutable selectors.
4. **Template carefully** — use `{{- with }}` and `{{ toYaml | nindent }}` for optional blocks (resources, nodeSelector, tolerations), `default`, and `required` for must-set values so a missing value fails loudly, not silently.
5. **Wire config and secrets** — checksum-annotate Deployments on ConfigMap/Secret changes to trigger rollouts; don't bake secrets into the chart.
6. **Add guardrails** — a values.schema.json sketch and notes on what NOTES.txt should print.

Output: (a) the values.yaml with defaults and comments, (b) one templated manifest (Deployment) showing the patterns, (c) the _helpers.tpl, (d) a prod overrides snippet, (e) what to verify with `helm template`/`helm lint`.

Related prompts

Newsletter

Free: the DevOps AI Incident-Triage Cheat Sheet

Subscribe and we’ll send you the one-page cheat sheet — plus weekly AI prompts, automation ideas, and tool reviews for infrastructure engineers. One email a week. No spam, unsubscribe anytime.

  • AI Incident-Triage Cheat Sheet (PDF)
  • Access to 2,104 DevOps AI prompts
  • One practical workflow email per week