Kubernetes Mastery

Develop and Deploy Cloud Native Applications at Scale

Installing 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 overridden
  • templates/: Directory containing Kubernetes manifest templates

Common Helm Commands

  1. Install a chart:

    helm install [RELEASE_NAME] [CHART]
    
  2. Uninstall a release:

    helm uninstall [RELEASE_NAME]
    
  3. Upgrade a release:

    helm upgrade [RELEASE_NAME] [CHART]
    
  4. List all releases:

    helm list
    
  5. View the manifest templates with values applied:

    helm template [CHART]
    
  6. Package a chart into a versioned archive file:

    helm package [CHART_PATH]
    

Deployment Workflow

  1. Create or modify chart files in the chart directory.
  2. Use helm template to preview the rendered Kubernetes manifests.
  3. Install or upgrade the release using helm install or helm upgrade.
  4. Monitor the deployment using kubectl commands.
  5. If needed, use helm uninstall to remove the release and all associated resources.