Loading...
Loading...
Manage Helm values across environments with override precedence, multi-environment configurations, and secret management. Covers values files, --set, --set-string, values schema validation. Use when user mentions Helm values, environment-specific configs, values.yaml, --set overrides, or Helm configuration.
npx skill4agent add laurigates/claude-plugins helm-values-management1. Chart defaults (values.yaml in chart)
↓
2. Parent chart values (if subchart)
↓
3. Previous release values (--reuse-values)
↓
4. Values files in order (-f values1.yaml -f values2.yaml)
↓
5. Individual overrides (--set, --set-string, --set-json, --set-file)
↑
HIGHEST PRECEDENCE# Chart values.yaml
replicaCount: 1
image:
tag: "1.0.0"
# -f base.yaml
replicaCount: 2
# -f production.yaml
image:
tag: "2.0.0"
# --set replicaCount=5
# RESULT:
# replicaCount: 5 (from --set, highest precedence)
# image.tag: "2.0.0" (from production.yaml)# Show chart default values
helm show values <chart>
# Show values from specific chart version
helm show values <chart> --version 1.2.3
# Save defaults to file
helm show values bitnami/nginx > default-values.yaml# Get values used in deployed release
helm get values <release> --namespace <namespace>
# Get ALL values (including defaults)
helm get values <release> --namespace <namespace> --all
# Get values in different formats
helm get values <release> -n <namespace> -o json
# Get values from specific revision
helm get values <release> -n <namespace> --revision 2# Using values file
helm install myapp ./chart \
--namespace prod \
--values values.yaml
# Using multiple values files (right-most wins)
helm install myapp ./chart \
--namespace prod \
-f values/base.yaml \
-f values/production.yaml
# Using --set for individual values
helm install myapp ./chart \
--namespace prod \
--set replicaCount=3 \
--set image.tag=v2.0.0
# Using --set-string to force string type
helm install myapp ./chart \
--namespace prod \
--set-string version="1.0"
# Using --set-json for complex structures
helm install myapp ./chart \
--namespace prod \
--set-json 'nodeSelector={"disktype":"ssd","region":"us-west"}'
# Using --set-file to read value from file
helm install myapp ./chart \
--namespace prod \
--set-file tlsCert=./certs/tls.crt# Reuse existing values, merge with new
helm upgrade myapp ./chart \
--namespace prod \
--reuse-values \
--set image.tag=v2.0.0
# Reset to chart defaults, ignore existing values
helm upgrade myapp ./chart \
--namespace prod \
--reset-values \
-f new-values.yamlproject/
├── charts/
│ └── myapp/ # Helm chart
│ ├── Chart.yaml
│ ├── values.yaml # Chart defaults
│ └── templates/
└── values/ # Environment-specific values
├── common.yaml # Shared across all environments
├── dev.yaml # Development overrides
├── staging.yaml # Staging overrides
├── production.yaml # Production overrides
└── secrets/ # Sensitive values (gitignored)
├── dev.yaml
├── staging.yaml
└── production.yaml# Shared configuration across all environments
app:
name: myapp
labels:
team: platform
component: api
service:
type: ClusterIP
port: 8080
ingress:
enabled: true
className: nginx
annotations:
cert-manager.io/cluster-issuer: letsencrypt
resources:
requests:
cpu: 100m
memory: 128Mi# Deploy to dev
helm upgrade --install myapp ./charts/myapp \
--namespace dev \
--create-namespace \
-f values/common.yaml \
-f values/dev.yaml \
-f values/secrets/dev.yaml
# Deploy to staging
helm upgrade --install myapp ./charts/myapp \
--namespace staging \
--create-namespace \
-f values/common.yaml \
-f values/staging.yaml \
-f values/secrets/staging.yaml \
--atomic --wait
# Deploy to production
helm upgrade --install myapp ./charts/myapp \
--namespace production \
--create-namespace \
-f values/common.yaml \
-f values/production.yaml \
-f values/secrets/production.yaml \
--atomic --wait --timeout 10m# String
name: myapp
tag: "v1.0.0" # Quote to ensure string
# Number
replicaCount: 3
port: 8080
# Boolean
enabled: true
debug: false
# Null
database: null# Nested objects
image:
repository: nginx
tag: "1.21.0"
pullPolicy: IfNotPresent
# Access in template: {{ .Values.image.repository }}# Simple list
tags:
- api
- web
- production
# List of objects
env:
- name: DATABASE_URL
value: postgres://db:5432/myapp
- name: REDIS_URL
value: redis://cache:6379# Simple value
--set name=myapp
# Nested value (use dot notation)
--set image.tag=v2.0.0
--set ingress.annotations."cert-manager\.io/cluster-issuer"=letsencrypt
# List values (use array index or {})
--set tags={api,web,prod}
# Complex JSON structures
--set-json 'nodeSelector={"disk":"ssd","region":"us-west"}'
# Force string (prevents numeric conversion)
--set-string version="1.0"
# Read value from file
--set-file cert=./tls.crt# Render templates with values
helm template myapp ./chart --values values.yaml
# Validate against Kubernetes API
helm install myapp ./chart \
--values values.yaml \
--dry-run --validate# See what values will be used (before install)
helm template myapp ./chart \
--values values.yaml \
--debug 2>&1 | grep -A 100 "COMPUTED VALUES"
# See what values were used (after install)
helm get values myapp --namespace prod --all# Test with minimal values
helm template myapp ./chart --set image.tag=test
# Test with full production values
helm template myapp ./chart \
-f values/common.yaml \
-f values/production.yaml| Context | Command |
|---|---|
| View values (JSON) | |
| All values (JSON) | |
| Computed values | |
| Validate schema | |