Overview
Thevalues.yaml file is the primary configuration interface for Helm charts. It defines default values that can be overridden during installation or upgrade to customize your deployment.
Common Value Patterns
Image Configuration
All charts follow a consistent pattern for image configuration:- If
tagis empty, the chart’sappVersionis used automatically pullPolicydefaults toIfNotPresentto reduce registry calls- Use
imagePullSecretsfor private registries
Replica and Scaling
- Static Replicas
- Autoscaling
Service Configuration
ClusterIP: Internal cluster access only (default)NodePort: Exposes on each node’s IP at a static portLoadBalancer: Creates external load balancer
Service Account
- Always create a service account for proper RBAC
- Use annotations for cloud provider integrations (e.g., AWS IAM roles)
- Let the chart generate the name unless you need specific naming
Overriding Values
Using --set Flag
For simple overrides during installation:
--set:
- Quick testing and experimentation
- Single value changes
- CI/CD pipelines with dynamic values
Using Values Files
For complex configurations, create a custom values file:- Production deployments
- Environment-specific configurations
- Complex multi-value changes
- Version-controlled configurations
Combining Methods
Environment Variables
Simple Environment Variables
Most charts support theenv field for custom environment variables:
Environment Variables from Secrets
Environment Variables from ConfigMaps
Chart-Specific Patterns
Some charts use different naming conventions:- extraEnvs
- envs.config/secret
- global.extraEnvs
Name Overrides
nameOverride: Replaces the chart name in resource namesfullnameOverride: Completely replaces the generated full name- Affects all Kubernetes resources (Deployments, Services, etc.)
Viewing Effective Values
Inspect Default Values
Check Deployed Values
Preview Before Install
Best Practices
Use Values Files for Production
Use Values Files for Production
Always use values files for production deployments. This allows:
- Version control integration
- Easier review and audit
- Consistent deployments
- Better documentation
Organize by Environment
Organize by Environment
Structure your values files by environment:
Never Commit Secrets
Never Commit Secrets
Never put sensitive values in values files:
- Use Kubernetes Secrets
- Reference secrets via
valueFrom.secretKeyRef - Consider tools like sealed-secrets or external-secrets
Document Custom Values
Document Custom Values
Create a README with your custom values:
Use Specific Image Tags
Use Specific Image Tags
Common Patterns Across Charts
Standard Fields
These fields appear consistently across all charts:Optional Components
Many charts include these optional features:Troubleshooting
Values Not Applied
Type Mismatches
Debugging Template Rendering
Next Steps
Customization
Learn advanced customization techniques
Ingress
Configure ingress and routing
Monitoring
Set up Prometheus monitoring
Chart Development
Create your own charts