2024-09-30Hünkar Döner

What is Helm? How to Use it for EKS?

KubernetesHelmEKSPackage Manager
W

What is Helm? How to Use it for EKS?

Deploying applications on Kubernetes can sometimes be complex. You need to write many different YAML files like Deployment, Service, Ingress, ConfigMap, Secret for an application. Managing, versioning, and customizing these files for different environments (Dev, Test, Prod) can turn into a nightmare over time.

This is where Helm comes in. Helm is the Package Manager for Kubernetes. It is to Kubernetes what apt or yum is to Linux.

What Does Helm Do?

  • Packaging: Collects all Kubernetes resources (YAML files) of your application in a single package (Chart).
  • Templating: Allows you to put variables inside YAML files. For example, by saying replicaCount: {{ .Values.replicaCount }}, you can pass the pod count as an external parameter.
  • Versioning: You can track versions of your application and roll back with a single command (helm rollback) if you make a faulty update.
  • Sharing: You can install complex applications in minutes using ready-made Helm Charts (e.g., WordPress, Prometheus, MySQL).

Using Helm on EKS

Using Helm on Amazon EKS is quite simple.

Step 1: Installation

Install the Helm CLI tool on your computer. Then ensure that the kubectl command can access your EKS cluster.

Step 2: Installing a Ready Chart

For example, let's say we want to install NGINX Ingress Controller:

helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
helm install my-nginx ingress-nginx/ingress-nginx

With these three commands, Load Balancer, Service, Deployment, and all necessary RBAC settings are installed automatically.

Step 3: Creating Your Own Chart

To create a chart for your own application: helm create my-app This command gives you a ready folder structure. You can configure your application by editing the values.yaml file.

Tip: Helm and CI/CD

Helm is indispensable for CI/CD processes (Jenkins, GitLab CI). Simply running the helm upgrade command is enough to deploy a new version of your application.

By using Helm in your EKS projects, you can get rid of YAML clutter and achieve a standardized deployment process.