DEV Community

Cover image for πŸ”₯Task #2 β€” Create Your First Helm Chart for GKE Cluster
Latchu@DevOps
Latchu@DevOps

Posted on

πŸ”₯Task #2 β€” Create Your First Helm Chart for GKE Cluster

Goal:

Learn how to create a Helm chart from scratch, understand its folder structure, and deploy it on your local or GKE Kubernetes cluster.


βœ… What You Will Learn

  • How to generate a Helm chart
  • Understand the purpose of each file/folder in a chart
  • Customize chart values
  • Deploy your chart into Kubernetes
  • Upgrade and rollback releases

πŸ§ͺ Prerequisites

  • Kubernetes cluster (Minikube, Kind, or GKE)
  • Helm installed:
helm version
Enter fullscreen mode Exit fullscreen mode

Create & Deploy Your First Helm Chart

Step 1 β€” Create a New Helm Chart

Run:

helm create myapp
Enter fullscreen mode Exit fullscreen mode

This generates a folder like:

myapp/
  Chart.yaml
  values.yaml
  charts/
  templates/
  templates/deployment.yaml
  templates/service.yaml
  templates/ingress.yaml
Enter fullscreen mode Exit fullscreen mode

1


Step 2 β€” Understand Chart Structure

πŸ“Œ Chart.yaml

Metadata of your application (chart name, version, app version).

πŸ“Œ values.yaml

Default configuration values (image, tag, service type, replicas, ports).
This is the file users can override.

πŸ“Œ templates/

Contains Kubernetes manifest templates with Helm placeholders.

πŸ“Œ charts/

Subcharts (used in microservices or dependencies).


Step 3 β€” Open & Explore values.yaml

Example sections:

replicaCount: 1

image:
  repository: nginx
  tag: "latest"

service:
  type: ClusterIP
  port: 80
Enter fullscreen mode Exit fullscreen mode

This values.yaml controls the behavior of the Kubernetes templates.


Step 4 β€” Render Templates Without Deploying

Check what Helm will generate:

helm template myapp/
Enter fullscreen mode Exit fullscreen mode

Or with custom values:

helm template myapp/ --set replicaCount=2
Enter fullscreen mode Exit fullscreen mode

Step 5 β€” Install the Chart

Deploy it to your cluster:

helm install myapp-release myapp/
Enter fullscreen mode Exit fullscreen mode

Verify:

kubectl get pods
kubectl get svc
Enter fullscreen mode Exit fullscreen mode

2


Step 6 β€” Upgrade the Release

Change something in values.yaml (e.g., replicas = 3).

Upgrade:

helm upgrade myapp-release myapp/
Enter fullscreen mode Exit fullscreen mode

Check rollout:

kubectl get pods
Enter fullscreen mode Exit fullscreen mode

3


Step 7 β€” Rollback to Previous Version

kubectl get pods
helm history myapp-release
helm rollback myapp-release 1
helm history myapp-release
kubectl get pods
Enter fullscreen mode Exit fullscreen mode

4


Step 8 β€” Uninstall the Release

helm uninstall myapp-release
Enter fullscreen mode Exit fullscreen mode

5


🎯 Outcome of Task #2

By completing Task #2, you now know:

βœ” How to create a Helm chart
βœ” How to understand & modify its structure
βœ” How Helm templates convert into Kubernetes YAML
βœ” How to install/upgrade/rollback Helm releases
βœ” How to manage your app with Helm like a pro


🌟 Thanks for reading! If this post added value, a like ❀️, follow, or share would encourage me to keep creating more content.


β€” Latchu | Senior DevOps & Cloud Engineer

☁️ AWS | GCP | ☸️ Kubernetes | πŸ” Security | ⚑ Automation
πŸ“Œ Sharing hands-on guides, best practices & real-world cloud solutions

Top comments (0)