How to deploy application using Helm in Kubernetes?

28 Jun 2020 » kubernetes

You could Buy me a coffee If you like the blogs and find them useful.

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

Prerequisites

  1. Create NFS share
    1. https://www.linuxbabe.com/ubuntu/nfs-share
    2. https://vitux.com/install-nfs-server-and-client-on-ubuntu/
  2. Install Helm. Refer installation guide here.

  3. Clone GitHub repository

    git clone https://github.com/developersthought/kubernetes-essentials.git
    
  4. Go to session_5 directory

    cd ./kubernetes-essentials/session_5/
    
  5. Enable Nginx ingress controller

    minikube addons enable ingress
    
    kubectl get pods --watch -n kube-system
    

    Exit once controller pod goes into running state

Step 1: Create PHPMyAdmin Helm Chart

helm create phpmyadmin

Step 2: Add all application YAML files to templates directory

Remove unwanted files from template directory

rm -rf ./phpmyadmin/templates/*

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/

Step 3: Package Helm Chart

helm package phpmyadmin

Step 4: Deploy PHPMyAdmin Application

helm install phpmyadmin ./phpmyadmin-0.1.0.tgz

Step 5: List helm release

helm ls

Step 6: List pods

kubectl get pods

Step 7:: Browse PHPMyAdmin Application using custom hostname

Step 8: Remove PHPMyAdmin Application

helm uninstall phpmyadmin

Show Your Support

  • Report an issue here If you find a bug or want to improve the content.