赞
踩
使用helm安装tiller
helm init --service-account=tiller --tiller-image=gcr.io/kubernetes-helm/tiller:v2.17.0
返回
$HELM_HOME has been configured at /root/.helm.
Warning: Tiller is already installed in the cluster.
(Use --client-only to suppress this message, or --upgrade to upgrade Tiller to the current version.)
[root@k8s-master helm]# helm version
Client: &version.Version{SemVer:"v2.17.0", GitCommit:"a690bad98af45b015bd3da1a41f6218b1a451dbe", GitTreeState:"clean"}
Error: could not find a ready tiller pod
查看pod状态
kubectl get pods -n kube-system
结果 tiller-deploy-7555cf9759-sv8rj 出现 ErrImagePull:
coredns-6d56c8448f-k224x 1/1 Running 1 12d
etcd-k8s-master 1/1 Running 10 12d
kube-apiserver-k8s-master 1/1 Running 23 12d
kube-controller-manager-k8s-master 1/1 Running 134 12d
kube-flannel-ds-gmj98 1/1 Running 0 5d
kube-flannel-ds-jpn79 1/1 Running 1 5d22h
kube-flannel-ds-zfjbv 1/1 Running 0 5d
kube-proxy-bld8q 1/1 Running 0 5d
kube-proxy-gpn26 1/1 Running 0 5d
kube-proxy-zh9t5 1/1 Running 4 12d
kube-scheduler-k8s-master 1/1 Running 134 12d
tiller-deploy-7555cf9759-sv8rj 0/1 ErrImagePull 0 25s
查看tiller-deploy-7555cf9759-sv8rj pod日志信息
kubectl describe pod tiller-deploy-7555cf9759-sv8rj -n kube-system
出现pull image error提示ErrImagePull
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal BackOff 3d15h (x2 over 3d15h) kubelet Back-off pulling image "gcr.io/kubernetes-helm/tiller:v2.17.0"
Warning Failed 3d15h (x2 over 3d15h) kubelet Error: ImagePullBackOff
Normal Pulling 3d15h (x3 over 3d15h) kubelet Pulling image "gcr.io/kubernetes-helm/tiller:v2.17.0"
Warning Failed 3d15h (x3 over 3d15h) kubelet Failed to pull image "gcr.io/kubernetes-helm/tiller:v2.17.0": rpc error: code = Unknown desc = Error response from daemon: Get https://gcr.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Warning Failed 3d15h (x3 over 3d15h) kubelet Error: ErrImagePull
Normal Scheduled 96s default-scheduler Successfully assigned kube-system/tiller-deploy-7555cf9759-sv8rj to k8s-node1
分析:gcr.io/kubernetes-helm/tiller:v2.17.0拉取镜像失败。
解决方法:
删除tiller deployment,顺带会一起删除tiller pod
kubectl delete -n kube-system deployment tiller-deploy
或者
helm reset -f
重新镜像安装
helm init --service-account=tiller --tiller-image=registry.cn-hangzhou.aliyuncs.com/google_containers/tiller:v2.17.0 --history-max 300
再次查看tiller pod状态
kubectl get pods -n kube-system
出现Running说明tiller安装成功
kube-controller-manager-k8s-master 1/1 Running 134 12d
kube-flannel-ds-gmj98 1/1 Running 0 5d1h
kube-flannel-ds-jpn79 1/1 Running 1 5d23h
kube-flannel-ds-zfjbv 1/1 Running 0 5d1h
kube-proxy-bld8q 1/1 Running 0 5d1h
kube-proxy-gpn26 1/1 Running 0 5d1h
kube-proxy-zh9t5 1/1 Running 4 12d
kube-scheduler-k8s-master 1/1 Running 134 12d
tiller-deploy-7d7cc8d4db-8jhww 1/1 Running 0 21s
查看helm版本
helm version
出现以下安装
Client: &version.Version{SemVer:"v2.17.0", GitCommit:"a690bad98af45b015bd3da1a41f6218b1a451dbe", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.17.0", GitCommit:"a690bad98af45b015bd3da1a41f6218b1a451dbe", GitTreeState:"clean"}
参考链接:
https://juejin.cn/post/6844904087234805767
https://www.jianshu.com/p/d0cdbb49569b
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。