Kubernetes集群设置失败

时间:2020-07-08 07:25:37

标签: kubernetes

我通过遵循以下steps

来设置kubernetes集群

遇到错误

error execution phase preflight: couldn't validate the identity of the API Server: Get https://master_ip:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s: context deadline exceeded (Client.Timeout exceeded while awaiting headers)




join.go:441] [preflight] Discovering cluster-info
I0708 11:21:00.558484   26181 token.go:188] [discovery] Trying to connect to API Server "ip_address:6443"
I0708 11:21:00.559011   26181 token.go:73] [discovery] Created cluster-info discovery client, requesting info from "https://ipaddress:6443"
I0708 11:21:00.559138   26181 round_trippers.go:423] curl -k -v -XGET  -H "Accept: application/json, */*" -H "User-Agent: kubeadm/v1.17.8 (linux/amd64) kubernetes/35dc4cd" 'https://ip_address:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s'
I0708 11:21:10.559339   26181 round_trippers.go:443] GET https://ip_address:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s  in 10000 milliseconds
I0708 11:21:10.559376   26181 round_trippers.go:449] Response Headers:
I0708 11:21:10.559439   26181 token.go:78] [discovery] Failed to request cluster info: [Get https://ip_address:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)]
I0708 11:21:10.559455   26181 token.go:191] [discovery] Failed to connect to API Server "ip_address:6443": Get https://ip_address:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
I0708 11:21:15.559694   26181 token.go:188] [discovery] Trying to connect to API Server "ip_address:6443"
I0708 11:21:15.560266   26181 token.go:73] [discovery] Created cluster-info discovery client, requesting info from "https://ip_address:6443"
I0708 11:21:15.560381   26181 round_trippers.go:423] curl -k -v -XGET  -H "Accept: application/json, */*" -H "User-Agent: kubeadm/v1.17.8 (linux/amd64) kubernetes/35dc4cd" 'https://ip_address:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s'
I0708 11:21:25.560573   26181 round_trippers.go:443] GET https://ip_address:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s  in 10000 milliseconds

1 个答案:

答案 0 :(得分:1)

这可能是由于以下原因

  1. 节点VM的时区不同
  2. 令牌中包含令人反感的n个字符
  3. 防火墙阻止了从工作者到主节点的流量。

运行kubeadm join,例如-v=9,以显示更多详细信息。

相关问题