New recipes every week

Turn Complexity Into
Cloud Recipes

Learn Kubernetes, AI, DevOps and DevSecOps the CloudChef way. Practical guides, real-world examples, no fluff.

Free forever No paywall Practical guides Real-world examples
50+Guides
WeeklyNew posts
K8s + AITop topics
FreeAlways
Helm Kubernetes Tuesday, January 31, 2023 ⏱ Calculating...

How to Create Helm Charts

CC
CloudChef
thecloudchef.io

Helm is the package manager for Kubernetes, making it easy to define, install, and manage applications. In this guide, you’ll learn how to create your own Helm chart from scratch and deploy it like a pro.


πŸ“¦ What is a Helm Chart?

A Helm chart is a collection of files that describe a Kubernetes application. Think of it as a reusable blueprint for deploying apps.

  • Templates → Kubernetes manifests
  • values.yaml → configuration
  • Chart.yaml → metadata

⚙️ 1. Install Helm


brew install helm

Verify installation:


helm version

🧱 2. Create a New Helm Chart


helm create my-app

This generates a structure like:


my-app/
  Chart.yaml
  values.yaml
  templates/

πŸ“ 3. Understand Chart.yaml


apiVersion: v2
name: my-app
version: 0.1.0
description: A Helm chart for Kubernetes

This file defines your chart metadata.


πŸ”§ 4. Customize values.yaml


replicaCount: 2

image:
  repository: nginx
  tag: latest

This is where you configure your application dynamically.


πŸ“„ 5. Update Templates

Example deployment template:


apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ .Release.Name }}
spec:
  replicas: {{ .Values.replicaCount }}

Helm uses Go templating to inject values dynamically.


πŸš€ 6. Install the Chart


helm install my-release ./my-app

Check deployment:


kubectl get pods

πŸ”„ 7. Upgrade Your Chart


helm upgrade my-release ./my-app

Helm makes updates easy without redeploying everything manually.


🧹 8. Uninstall


helm uninstall my-release

🧠 Best Practices

  • Keep charts reusable and configurable
  • Use separate values files per environment
  • Version your charts properly
  • Avoid hardcoding values

πŸ”₯ Pro Tips

  • Use helm lint to validate charts
  • Use helm template to debug output
  • Integrate Helm into CI/CD pipelines

πŸ”— Continue Your CloudChef Journey

If you found this helpful, here are more CloudChef guides you should explore:


πŸš€ Final Thoughts

Helm simplifies Kubernetes deployments and enables scalable, reusable configurations. Once you master Helm, managing applications in Kubernetes becomes significantly easier.

πŸ”₯ CloudChef Tip: Treat Helm charts like code—version them, test them, and automate them.


πŸ”₯ Trending CloudChef Recipes

⭐ Popular CloudChef Recipes

No comments:

Post a Comment

πŸ’‘ Found this useful?

Share it with your Team or DevOps Friends πŸ‘‡