install helm code example

Example 1: install helm on wsl

# Download the install shell script
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3

# Allow to Run
chmod 700 get_helm.sh
# Install
./get_helm.sh

# Confirm it works
$helm version
    version.BuildInfo{Version:"v3.0.2", GitCommit:"19e47ee3283ae98139d98460de796c1be1e3975f", GitTreeState:"clean", 		GoVersion:"go1.13.5"}

Example 2: install helm 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

Example 3: installing helm v2 and tiller on minikube

#installing helm
curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > install-helm.sh
bash install-helm.sh

#Create the Tiller service account
kubectl create serviceaccount tiller --namespace kube-system
#Bind the Tiller service account to the cluster-admin role
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
#initialisr helm with service account "tiller"
helm init --service-account tiller

#sharing YAML file to bind tiller service account to cluster-admin role
#Yo can use this YAML file if you do not want to do binding with command
# and want to know further.
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
  name: tiller-clusterrolebinding
subjects:
- kind: ServiceAccount
  name: tiller
  namespace: kube-system
roleRef:
  kind: ClusterRole
  name: cluster-admin
  apiGroup: ""