Kubernetes-Helm Charts

 HELM (The package manager for Kubernetes)


Helm is the best way to find, share and use software built for kubernetes

Installation Steps On Ubuntu


  •  curl https://baltocdn.com/helm/signing.asc | sudo apt-key add -
  •  sudo apt-get install apt-transport-https --yes
  •  echo "deb https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
  •  sudo apt-get update
  •  sudo apt-get install helm

Verification

 helm version
 helm --help

Add Stable Repository

  1.  helm repo add stable https://charts.helm.sh/stable
  2.  helm search repo stable
  3.  helm repo update
  4.  helm install prometheus stable/prometheus-operator
  5.  kubectl --namespace default get pods -l "release=prometheus"

Create a chart with default template

  • helm create helloworld
  • helm install helloworld-1 helloworld
  •  kubectl get deploy
  • helm install --set replicaCount=2 helloworld-2 helloworld
  • kubectl get deploy
  • helm upgrade --set replicaCount=4 helloworld-2 helloworld
  • Overwride values.yaml. create a file called myvalues.yaml
  •   replicaCount: 5
  •  helm upgrade -f myvalues.yaml helloworld-2 helloworld

Create Charts

1. Create a chart name it mychart 
         helm create mychart
2. helm template mychart
3. helm lint mychart
2. Remove all the files under the template folder
         rm -ifr *
3. Create a Yaml file under template folder

apiVersion: v1
kind: Pod
metadata:
    name: pod20
spec:
   containers:
   - name: c1
     image: nginx

4. Change to home directory

cd /home/ubuntu

5. Install mychart 

    helm install mychart ./mychart

6. list the charts

   helm list

7. List the pods

  pod20 should be created.

8. helm uninstall mychart

Comments