我已经在 Ubuntu 16.04LTS 系统中配置了 kubernet v1.9.3。主节点已成功创建,但存在 kube-dns pod 连接被拒绝的问题。
我在日志中收到以下异常:
Liveness probe failed: HTTP probe failed with statuscode: 503
Readiness probe failed: Get http://10.244.0.6:8081/readiness: dial tcp 10.244.0.6:8081: getsockopt: connection refused
我已经安装了以下用于网络的 flannel 包:
clusterrole "flannel" created
clusterrolebinding "flannel" created
serviceaccount "flannel" created
configmap "kube-flannel-cfg" created
daemonset "kube-flannel-ds" created
需要知道为什么我会收到此连接被拒绝错误。
答案1
您能否尝试以下命令:
kubectl apply -f https://github.com/coreos/flannel/blob/v0.8.0/Documentation/kube-flannel.yml -f https://github.com/coreos/flannel/blob/v0.8.0/Documentation/kube-flannel-rbac.yml
然后尝试列出 pod 并检查 kube-dns pod 的日志