How to deploy applications using Helm in Kubernetes?

sagarjadhv23

Sagar Jadhav

Posted on June 28, 2020

How to deploy applications using Helm in Kubernetes?

Let's learn How to deploy PHPMyAdmin application using helm chart? Learn more about helm here.

Prerequisites:

Create NFS share

Reference:

Install Helm

Refer installation guide here

Clone github repository

git clone https://github.com/sagar-jadhav/kubernetes-essentials.git
Enter fullscreen mode Exit fullscreen mode

Go to session_5 directory

cd ./kubernetes-essentials/session_5/
Enter fullscreen mode Exit fullscreen mode

Enable Nginx ingress controller

minikube addons enable ingress
Enter fullscreen mode Exit fullscreen mode
kubectl get pods --watch -n kube-system
Enter fullscreen mode Exit fullscreen mode

Exit once controller pod goes into running state

Step 1: Create PHPMyAdmin helm chart

helm create phpmyadmin
Enter fullscreen mode Exit fullscreen mode

Step 2: Add all application YAML files to templates directory

Remove unwanted files from template directory

rm -rf ./phpmyadmin/templates/*
Enter fullscreen mode Exit fullscreen mode

Copy YAML files

cp configmap.yaml db-deployment.yaml db-pv.yaml db-pvc.yaml db-service.yaml secret.yaml phpmyadmin-deployment.yaml phpmyadmin-ingress.yaml phpmyadmin-service.yaml ./phpmyadmin/templates/
Enter fullscreen mode Exit fullscreen mode

Step 3: Package helm chart

helm package phpmyadmin
Enter fullscreen mode Exit fullscreen mode

Step 4: Deploy PHPMyAdmin application

helm install phpmyadmin ./phpmyadmin-0.1.0.tgz
Enter fullscreen mode Exit fullscreen mode

Step 5: List helm release

helm ls
Enter fullscreen mode Exit fullscreen mode

Step 6: List pods

kubectl get pods
Enter fullscreen mode Exit fullscreen mode

Demo

💖 💪 🙅 🚩
sagarjadhv23
Sagar Jadhav

Posted on June 28, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

What is Platform Engineering?
kubernetes What is Platform Engineering?

October 17, 2024

Release Channel in K8s
kubernetes Release Channel in K8s

October 16, 2024