1

我对此有点困惑,因为它已经工作了好几天没有问题。

我曾经能够毫无问题地将节点加入我的集群。我将在主节点上运行以下命令:

kubeadm init .....

之后,它会生成一个加入命令和令牌来发布给我想加入的其他节点。像这样的东西:

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 服务器,但由于某种原因,它现在无法请求证书。

有什么想法吗?

4

2 回答 2

1

大部头书

sudo service kubelet restart

没用。我所做的是以下内容:

  • 从 /etc/kubernetes/* 的主节点内容复制到 /etc/kubernetes 相同位置的从节点

我再次尝试了“kubeadm join ...”命令。这次节点加入集群没有任何抱怨。

我认为这是一个临时的黑客,但工作!

于 2017-04-04T23:26:24.557 回答
0

好的,我只是停止并在主节点上启动 kubelet,如下所示,事情又开始工作了:

sudo service kubelet stop
sudo service kubelet start

编辑:这对我来说似乎只准时工作。

于 2017-03-24T22:06:51.090 回答