Kubernetes Helm

apiVersion: v1
name: my-nginx
version: 0.1.0
helm helphelm install package-name ( — values) ( — name).helm fetch package-name => to fetch chart locally to your machine.helm list => it list the installed package or application.helm status => it show throw the status of the application  deployment.
helm search => search for the chart.
helm repo update => it use to update the repo.helm upgrade => to upgrade the chart.helm rollback => to rollback to any previous version of chart.helm delete ( — pergue) => delete the deployment. if you want to delete completely with revision.helm reset ( — force) => it will delete the completely the tiller in your cluster.
wget https://get.helm.sh/helm-v2.16.10-linux-amd64.tar.gz
tar xzvf helm-v2.16.10-linux-amd64.tar.gz
cd linux-amd64/
sudo mv helm /usr/local/bin/
which helm
helm version — short
#Create clusterRoleBinding
kubectl create clusterrolebinding tiller — clusterrole cluster-admin — serviceaccount=kube-system:tiller
kubectl get clusterrolebinding tiller
#Initilised Helm
helm init — service-account tiller
#Now tiller pod will be created and the help conf directory also has been created.kubectl get po -n kube-system
ls -l ~/.helm/
# curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
# chmod 700 get_helm.sh
# ./get_helm.sh
#Check the helm default repository
helm repo list
#Check installed application
helm list
#Check any application
helm search jenkins
#Check what's inside application
helm inspect stable/jenkins
#Download the chart
helm fetch stable/jenkins
ls
kubectl get deploy,replicaset,pod,serviceaccount,clusterrolebinding -n kube-system | grep tiller#Delete helm completely
helm reset — remove-helm-home
# mkdir my-nginx
# cd mkdir my-nginx
# vim Chart.yaml
# mkdir templates
# kubectl create deploy my-ngunx — image nginx — dry-run -o yaml > deployment.yml
#helm install my-nginx .
# kubectl expose deploy my-ngunx — port 80 — dry-run -o yaml > templates/service.yml
# vim Chart.yaml
# helm upgrade my-nginx .
# helm rollback my-nginx 1
# helm delete my-nginx
# vim values.yml
replicaCount: 1
# vim templates/deployment.yml
replicas: {{ .Values.replicaCount }}
vim Chart.yaml
# helm install my-nginx . — set replicaCount=2
or
# helm inspect values . > /tmp/my-nginx.values
now update the replicaCount in the files
# vim /tmp/my-nginx.values
deploy the helm
# helm install my-nginx . — values > /tmp/my-nginx.values
# vim values.yaml
replicaCount: 1
service:
type: NodePort
# vim templates/service.yml
spec:
type: {{ .Values.service.type }}
# vim Chart.yml
# helm upgrade my-nginx . — set service.type=NodePort
# helm upgrade my-nginx . — set service.type=LoadBalancer — set replicaCount=2
helm install stable/mysql — name mysql
helm list
#Check any installed plugin
helm plugin list
helm3 plugin list
#Install helm-2to3 plugin to migrate helm v2 to v3
helm3 plugin install https://github.com/helm/helm-2to3
helm3 plugin list
## plugin 2to3 options
helm3 2to3 help
# move the helm2 config to helm3
helm3 2to3 move config — dry-run
helm3 2to3 move config
#Now you can get default repository of helm3
helm3 repo list
# Now we have to migrate application from v2 to v3 one by one
helm3 2to3 convert mysql — dry-run
helm3 2to3 convert mysql
# Check the application
helm3 list
kubectl get all
# Delete the helm2
helm3 2to3 cleanup
# Re-Install again
helm3 repo update
helm3 search repo mysql
helm3 install mysql stable/mysql
helm3 list

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store