Upgrading our Helm Charts
Key Takeaways
Helm is a package manager for Kubernetes that simplifies the deployment and management of applications. By using Helm Charts, you can manage complex Kubernetes applications as a single unit, simplifying deployment, upgrades, and rollbacks. This approach provides a more organized and maintainable way to handle Kubernetes resources compared to managing individual loose resources.
Directory Structure
A typical Helm Chart has the following structure:
mychart/
├── Chart.yaml # Contains chart information
├── values.yaml # Default configuration values
└── templates/ # Directory for template files
├── deployment.yaml
├── service.yaml
└── ingress.yaml
Chart.yaml: Metadata about the chart (name, version, dependencies)values.yaml: Default configuration values that can be overriddentemplates/: Directory containing Kubernetes manifest templates
Common Helm Commands
Install a chart:
helm install [RELEASE_NAME] [CHART]Uninstall a release:
helm uninstall [RELEASE_NAME]Upgrade a release:
helm upgrade [RELEASE_NAME] [CHART]List all releases:
helm listView the manifest templates with values applied:
helm template [CHART]Package a chart into a versioned archive file:
helm package [CHART_PATH]
Deployment Workflow
- Create or modify chart files in the chart directory.
- Use
helm templateto preview the rendered Kubernetes manifests. - Install or upgrade the release using
helm installorhelm upgrade. - Monitor the deployment using
kubectlcommands. - If needed, use
helm uninstallto remove the release and all associated resources.