在下列网站下载helm的相关版本
https://github.com/kubernetes/helm/releases
tar -xvzf $HELM.tar.gz
mv linux-amd64/helm /usr/local/bin/helm
在K8s节点上配置.kube/config
[root@k8s-node-1 ~]# kubectl config set-cluster kubernetes --server=http://192.168.0.104:8080 Cluster "kubernetes" set. [root@k8s-node-1 ~]# kubectl config set-credentials admin User "admin" set. [root@k8s-node-1 ~]# kubectl config set-context kubernetes > --cluster=kubernetes > --user=admin Context "kubernetes" set. [root@k8s-node-1 ~]# kubectl config use-context kubernetes Switched to context "kubernetes".
运行安装
[root@k8s-node-1 ~]# kubectl create serviceaccount --namespace kube-system tiller serviceaccount "tiller" created [root@k8s-node-1 ~]# helm init --service-account tiller --skip-refresh $HELM_HOME has been configured at /root/.helm. Tiller (the Helm server-side component) has been installed into your Kubernetes Cluster. Happy Helming!
然后去查看
[root@k8s-node-1 ~]# kubectl get pod -n kube-system -l app=helm NAME READY STATUS RESTARTS AGE tiller-deploy-3018021184-dxpfj 0/1 ContainerCreating 0 26s
[root@k8s-node-1 ~]# kubectl describe pods tiller-deploy-3018021184-dxpfj -n kube-system Name: tiller-deploy-3018021184-dxpfj Namespace: kube-system Node: k8s-node-1/192.168.0.105 Start Time: Fri, 23 Feb 2018 18:41:28 +0800 Labels: app=helm name=tiller pod-template-hash=3018021184 Status: Pending IP: Controllers: ReplicaSet/tiller-deploy-3018021184 Containers: tiller: Container ID: Image: gcr.io/kubernetes-helm/tiller:v2.8.1 Image ID: Ports: 44134/TCP, 44135/TCP State: Waiting Reason: ContainerCreating Ready: False Restart Count: 0 Liveness: http-get http://:44135/liveness delay=1s timeout=1s period=10s #success=1 #failure=3 Readiness: http-get http://:44135/readiness delay=1s timeout=1s period=10s #success=1 #failure=3 Volume Mounts: /var/run/secrets/kubernetes.io/serviceaccount from tiller-token-xng0h (ro) Environment Variables: TILLER_NAMESPACE: kube-system TILLER_HISTORY_MAX: 0 Conditions: Type Status Initialized True Ready False PodScheduled True Volumes: tiller-token-xng0h: Type: Secret (a volume populated by a Secret) SecretName: tiller-token-xng0h QoS Class: BestEffort Tolerations: <none> Events: FirstSeen LastSeen Count From SubObjectPath Type Reason Message --------- -------- ----- ---- ------------- -------- ------ ------- 1m 1m 1 {default-scheduler } Normal Scheduled Successfully assigned tiller-deploy-3018021184-dxpfj to k8s-node-1 1m 1m 1 {kubelet k8s-node-1} spec.containers{tiller} Normal Pulling pulling image "gcr.io/kubernetes-helm/tiller:v2.8.1"
发现需要gcr.io/kubernetes-helm/tiller:v2.8.1
一番折腾后运行后完成
helm init --service-account tiller --upgrade -i index.tenxcloud.com/kubernetes-helm/tiller:v2.6.0 --skip-refresh
明天继续。。。