Skip to content

Instantly share code, notes, and snippets.

@jesusgoku
Created January 27, 2020 18:30
Show Gist options
  • Save jesusgoku/5f42470a882d9e0e531960ea71aac19e to your computer and use it in GitHub Desktop.
Save jesusgoku/5f42470a882d9e0e531960ea71aac19e to your computer and use it in GitHub Desktop.
Tiller init on Kubernetes cluster for Helm v2
#!/bin/bash
cat <<EOF | kubectl apply -f -
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
helm init --service-account=tiller \
--stable-repo-url=https://kubernetes-charts.storage.googleapis.com \
--upgrade \
--automount-service-account-token=true \
--replicas=1 \
--history-max=100 \
--wait
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment