我对此感到有点困惑,因为它在没有问题的情况下工作了好几天。
我使用能够将节点连接到我的群集而没有问题。我将在主节点上运行以下内容:
kubeadm init .....
之后,它会生成一个join命令和令牌,以发送给我想要加入的其他节点。像这样:
kubeadm join --token 99385f.7b6e7e515416a041 192.168.122.100
我会在节点上运行它,他们会毫无问题地加入。第二天早上,突然间它停止了工作。这就是我现在运行命令时看到的内容:
[kubeadm] WARNING: kubeadm is in alpha, please do not use it for
production clusters.
[preflight] Running pre-flight checks
[tokens] Validating provided token
[discovery] Created cluster info discovery client, requesting info from "http://192.168.122.100:9898/cluster-info/v1/?token-id=99385f"
[discovery] Cluster info object received, verifying signature using given token
[discovery] Cluster info signature and contents are valid, will use API endpoints [https://192.168.122.100:6443]
[bootstrap] Trying to connect to endpoint https://192.168.122.100:6443
[bootstrap] Detected server version: v1.6.0-rc.1
[bootstrap] Successfully established connection with endpoint "https://192.168.122.100:6443"
[csr] Created API client to obtain unique certificate for this node, generating keys and certificate signing request
failed to request signed certificate from the API server [cannot create certificate signing request: the server could not find the requested resource]
我尝试加入的节点似乎成功连接到主节点上的API服务器,但由于某种原因,它现在无法请求证书。
有什么想法吗?
答案 0 :(得分:1)
给我
sudo service kubelet restart
没有工作。 我做的是以下内容:
我再次尝试" kubeadm加入......"命令。这次节点加入群集而没有任何抱怨。
我认为这是一个暂时的黑客,但有效!
答案 1 :(得分:0)
sudo service kubelet stop
sudo service kubelet start
编辑: 这似乎只对我有用。