Skip to content

Instantly share code, notes, and snippets.

@ticapix
Last active April 5, 2020 08:12
Show Gist options
  • Save ticapix/762878ad070fcc1d164ff35fbc25b5ca to your computer and use it in GitHub Desktop.
Save ticapix/762878ad070fcc1d164ff35fbc25b5ca to your computer and use it in GitHub Desktop.

HELM 3

install Helm

sudo snap install helm --classic

add repo

helm repo add stable https://kubernetes-charts.storage.googleapis.com/

HELM 2

install kubectl

export PATH=`pwd`:$PATH
export KUBECONFIG=`pwd`/kubeconfig.yml

From https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-on-linux

curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl

create ServiceAccount and ClusterRoleBinding

kubectl apply -f - <<EOF
apiVersion: v1
kind: ServiceAccount
metadata:
  name: tiller
  namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: tiller
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
  - kind: ServiceAccount
    name: tiller
    namespace: kube-system
EOF

install Helm

export HELM_INSTALL_DIR=`pwd`
export USE_SUDO=false
curl -C - https://raw.githubusercontent.com/helm/helm/master/scripts/get | bash

install Tiller

export PATH=`pwd`:$PATH
helm init --upgrade --service-account tiller # deploy the service in the remote cluster

verify setup and update repo

kubectl get pods -n kube-system -l app=helm # check that the pod is up and running
helm version # check that both client and server version are the same
helm repo update # Update the helm package list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment