出现以下报错信息,如下:
TASK [preinstall : check helm status] ******************************************
fatal: [localhost]: FAILED! => {“changed”: true, “cmd”: “/usr/local/bin/helm list\n”, “delta”: “0:00:00.598385″, “end”: “2020-05-13 01:27:17.951124”, “msg”: “non-zero return code”, “rc”: 1, “start”: “2020-05-13 01:27:17.352739”, “stderr”: “Error: could not find a ready tiller pod”, “stderr_lines”: [“Error: could not find a ready tiller pod”], “stdout”: "", “stdout_lines”: []}
…ignoring
TASK [preinstall : Stop if Helm is not available] ******************************
fatal: [localhost]: FAILED! => {
“assertion”: “helm_check.rc == 0″,
“changed”: false,
“evaluated_to”: false,
“msg”: “Helm is not available”
}
分析过程:
[root@k8sphere01 scripts]# helm version
Client: &version.Version{SemVer:“v2.14.3″, GitCommit:“0e7f3b6637f7af8fcfddb3d2941fcc7cbebb0085″, GitTreeState:“clean”}
Server: &version.Version{SemVer:“v2.14.3″, GitCommit:“0e7f3b6637f7af8fcfddb3d2941fcc7cbebb0085”, GitTreeState:“clean”}
#kubectl describe pod tiller-deploy-79b566b5ff-62f96 -n kube-system
有报错信息:
PodScheduled True
Volumes:
tiller-token-fvrmm:
Type: Secret (a volume populated by a Secret)
SecretName: tiller-token-fvrmm
Optional: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
Warning Unhealthy 69m (x770 over 14h) kubelet, k8sphere03 Readiness probe failed: Get http://10.233.65.3:44135/readiness: dial tcp 10.233.65.3:44135: connect: no route to host
Normal Pulled 64m (x271 over 14h) kubelet, k8sphere03 Container image “kubesphere/tiller:v2.14.3″ already present on machine
Warning BackOff 59m (x3274 over 14h) kubelet, k8sphere03 Back-off restarting failed container
Warning FailedCreatePodSandBox 56m kubelet, k8sphere03 Failed create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container “2caca065eba1fa8f66c71ed1e2b1cbd2e3a5b4bfbb21282a48f3dd5d7a91a3f8” network for pod “tiller-deploy-79b566b5ff-62f96”: networkPlugin cni failed to set up pod “tiller-deploy-79b566b5ff-62f96_kube-system” network: open /run/flannel/subnet.env: no such file or directory
Warning FailedCreatePodSandBox 56m kubelet, k8sphere03 Failed create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container “01dd1f5544bd9b61a1bfe03f33ef6a84170339189bf8b4875780c4b8c56b22a8″ network for pod “tiller-deploy-79b566b5ff-62f96″: networkPlugin cni failed to set up pod “tiller-deploy-79b566b5ff-62f96_kube-system” network: open /run/flannel/subnet.env: no such file or directory
Warning FailedCreatePodSandBox 56m kubelet, k8sphere03 Failed create pod sandbox: rpc error: code = Unknown desc = failed to set up sandbox container “8df5de9979379b75f490e666fe604c1ae4a32cac37d1c83c2faf511c0abba457″ network for pod “tiller-deploy-79b566b5ff-62f96”: networkPlugin cni failed to set up pod “tiller-deploy-79b566b5ff-62f96_kube-system” network: open /run/flannel/subnet.env: no such file or directory
Normal SandboxChanged 41m (x5 over 56m) kubelet, k8sphere03 Pod sandbox changed, it will be killed and re-created.
Normal Pulled 41m (x2 over 56m) kubelet, k8sphere03 Container image “kubesphere/tiller:v2.14.3” already present on machine
Normal Created 41m (x2 over 56m) kubelet, k8sphere03 Created container tiller
Normal Started 41m (x2 over 56m) kubelet, k8sphere03 Started container tiller
Warning Unhealthy 41m (x3 over 41m) kubelet, k8sphere03 Liveness probe failed: Get http://10.233.65.8:44135/liveness: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Warning Unhealthy 40m (x11 over 41m) kubelet, k8sphere03 Readiness probe failed: Get http://10.233.65.8:44135/readiness: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
[root@k8sphere01 scripts]#
怎么解决这个问题?请各位大佬帮忙看看