agentleFS
G1JoshiG1Joshi/Agent-Skills/skills/devops/helm/SKILL.md

helm

Skill15 starsChanged 42 days agoMITView on GitHub

Expert Helm Kubernetes package manager assistance covering charts, values.yaml, Go templates, release rollbacks, and dependencies. Use when packaging and deploying Kubernetes applications.

10 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use Helm Go templates with values defaults:

    line 124
  2. Very specific:

    Always use --atomic and --timeout during helm upgrade to ensure automatic rollback on deployment failure.

    line 153
  3. Very specific:

    Use helm template and kubectl apply without validating that CRDs and hooks are handled appropriately.

    line 161

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Helm

Helm is the package manager for Kubernetes, enabling declarative application packaging, versioned chart releases, OCI registry distribution, and automated rollbacks.

When to Use

  • Kubernetes Package Management: Packaging, templating, versioning, and deploying complex Kubernetes applications.
  • Multi-Environment Value Overrides: Reusing a single chart across dev, staging, and production with distinct values.yaml files.
  • Third-Party Open-Source Deployment: Installing community software (Cert-Manager, Ingress-Nginx, Prometheus) via Helm Repos.
  • Release Lifecycle & Rollbacks: Upgrading, tracking release revisions, and executing automated rollbacks via helm rollback.

Quick Start

# Install a chart
helm install my-release oci://registry-1.docker.io/bitnamicharts/nginx

# Create a chart
helm create my-chart
# values.yaml
replicaCount: 2
image:
  repository: nginx
  tag: "1.25"

Core Concepts

Parameterized Deployment Template

Templating Kubernetes resources with Helm helpers:

# templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "mychart.fullname" . }}
  labels:
    {{- include "mychart.labels" . | nindent 4 }}
spec:
  replicas: {{ .Values.replicaCount }}
  selector:
    matchLabels:
      {{- include "mychart.selectorLabels" . | nindent 6 }}
  template:
    metadata:
      labels:
        {{- include "mychart.selectorLabels" . | nindent 8 }}
    spec:
      containers:
        - name: {{ .Chart.Name }}
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
          imagePullPolicy: {{ .Values.image.pullPolicy }}
          ports:
            - containerPort: {{ .Values.service.port }}
          resources:
            {{- toYaml .Values.resources | nindent 12 }}

Values Schema Validation (values.schema.json)

Enforcing strict type checking on user-provided values:

{
  "$schema": "https://json-schema.org/draft-07/schema#",
  "properties": {
    "replicaCount": {
      "type": "integer",
      "minimum": 1
    },
    "image": {
      "type": "object",
      "required": ["repository"],
      "properties": {
        "repository": { "type": "string" },
        "tag": { "type": "string" }
      }
    }
  },
  "required": ["replicaCount", "image"]
}

Helm CLI Deployment & Rollback Commands

Deploying, linting, and managing releases:

# Lint chart templates for errors
helm lint ./mychart

# Dry run deployment with template rendering
helm install my-release ./mychart --dry-run --debug

# Upgrade with atomic rollback if health checks fail
helm upgrade --install my-release ./mychart \
  --namespace production \
  --create-namespace \
  --values values-production.yaml \
  --atomic \
  --timeout 5m

# Roll back to previous revision if needed
helm rollback my-release 1 --namespace production

Common Patterns

Parameterized Values Template with Default Fallback

Problem: Hardcoding replica counts and container images in raw Kubernetes YAML.

Solution: Use Helm Go templates with values defaults:

# templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ .Release.Name }}-{{ .Chart.Name }}
spec:
  replicas: {{ .Values.replicaCount | default 2 }}
  selector:
    matchLabels:
      app: {{ .Release.Name }}
  template:
    metadata:
      labels:
        app: {{ .Release.Name }}
    spec:
      containers:
        - name: app
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
          ports:
            - containerPort: {{ .Values.service.port | default 8080 }}

Best Practices

Do:

  • Always use --atomic and --timeout during helm upgrade to ensure automatic rollback on deployment failure.
  • Author a values.schema.json to catch configuration errors before reaching the Kubernetes API server.
  • Define helper templates in _helpers.tpl for standard label generation and naming conventions.
  • Store Helm charts in OCI-compliant container registries (GHCR, ECR, Artifact Registry) via helm push.

Don't:

  • Hardcode sensitive passwords in values.yaml; inject secrets via external secret managers.
  • Use helm template and kubectl apply without validating that CRDs and hooks are handled appropriately.
  • Deploy charts without setting explicit resource requests and limits in default values.

Troubleshooting

ErrorCauseSolution
Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progressPrevious Helm operation interrupted leaving release secret locked.Rollback release or manually unlock release secret: helm rollback <release>.
Error: execution error at (templates/deployment.yaml:10:15): nil pointerAccessing non-existent key in .Values without default check.Verify key exists in values.yaml or use default function.
Error: rendered manifests contain a resource that already existsAttempting to adopt an existing Kubernetes resource not tracked by Helm.Add annotations: meta.helm.sh/release-name: <name> or delete resource.

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.