DEV Community

Cover image for How to deploy applications using Helm in Kubernetes?
Sagar Jadhav
Sagar Jadhav

Posted on • Originally published at developersthought.in

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

Top comments (0)