Add Helm Repo
helm repo add welagedara https://welagedara.github.io/helm/
Check if the Repo got added succefully
helm repo list
Update the Repos
helm repo update
Install hello-world. The latest version will be installed if –version flag is not set.
helm install welagedara/hello-world
Check for errors
helm lint ./hello-world/
Package it
helm package ./hello-world/
Update index.yaml
helm repo index ./
Push the artifacts to Github
git push origin master
Install the app
helm install ./hello-world
Upgrade the app
helm upgrade --set replicaCount=2,image.tag="1.13" HELM_NAME ./hello-world
To check nginx version
kubectl exec POD_NAME -- nginx -v
To check revison number
helm list -a
or
helm history HELM_NAME
To rollback
helm rollback HELM_NAME REVISION_NUMBER
Example:
helm rollback needled-hog 1
Install the app
helm install -f ./hello-world-helm.yaml ./hello-world
Upgrade the app
helm upgrade -f ./hello-world-helm-upgraded.yaml HELM_NAME ./hello-world
To check nginx version
kubectl exec POD_NAME -- nginx -v
To check revison number
helm list -a
or
helm history HELM_NAME
To rollback
helm rollback HELM_NAME REVISION_NUMBER
Example:
helm rollback early-ladybird 1
If you run into permission issues try these commands.
helm init
kubectl create serviceaccount --namespace kube-system tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
helm init --service-account tiller --upgrade
Or
kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default