Se faciliter la vie avec Helm
Rédigé par dada / 06 novembre 2018 / Aucun commentaire
Installer Helm
Récupérer les binaires
dada@k8smaster:~$ mkdir helm
dada@k8smaster:~$ cd helm
dada@k8smaster:~/helm$ wget https://storage.googleapis.com/kubernetes-helm/helm-v2.11.0-linux-amd64.tar.gz
dada@k8smaster:~/helm$ tar -zxvf helm-v2.11.0-linux-amd64.tar.gz
root@k8smaster:/home/dada/helm# mv linux-amd64/helm /usr/local/bin/
helm version
Client: &version.Version{SemVer:"v2.11.0", GitCommit:"2e55dbe1fdb5fdb96b75ff144a339489417b146b", GitTreeState:"clean"}
Initialiser Helm
dada@k8smaster:~$ helm init
$HELM_HOME has been configured at /home/dada/.helm.
Tiller (the Helm server-side component) has been installed into your Kubernetes Cluster.
Please note: by default, Tiller is deployed with an insecure 'allow unauthenticated users' policy.
To prevent this, run `helm init` with the --tiller-tls-verify flag.
For more information on securing your installation see: https://docs.helm.sh/using_helm/#securing-your-helm-installation
Happy Helming!
Error: could not find tiller
dada@k8smaster:~$ helm version
Client: &version.Version{SemVer:"v2.11.0", GitCommit:"2e55dbe1fdb5fdb96b75ff144a339489417b146b", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.11.0", GitCommit:"2e55dbe1fdb5fdb96b75ff144a339489417b146b", GitTreeState:"clean"}
dada@k8smaster:~$ kubectl get pods --all-namespaces -o wide | grep tiller
kube-system tiller-deploy-845cffcd48-268tr 1/1 Running 0 4m22s 10.244.2.61 k8snode2 <none>
Configurer les permissions
Donner les droits admin à Helm
dada@k8smaster:~$ kubectl create serviceaccount --namespace kube-system tiller
dada@k8smaster:~$ kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
dada@k8smaster:~$ kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
Mettre à jour la configuration
dada@k8smaster:~$ helm init --service-account tiller --upgrade
$HELM_HOME has been configured at /home/dada/.helm.
Tiller (the Helm server-side component) has been upgraded to the current version.
Happy Helming