kubeadm连接失败.无法请求签名证书 [英] kubeadm join failing. Unable to request signed cert

查看:157
本文介绍了kubeadm连接失败.无法请求签名证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm a bit confused by this, because it was working for days without issue.

我曾经能够将节点加入群集而不会出现问题.我将在主节点上运行以下命令:

I use to be able to join nodes to my cluster withoout issue. I would run the below on the master node:

kubeadm init .....

在那之后,它将生成一个加入命令和令牌,以发布给我想要加入的其他节点.像这样:

After that, it would generate a join command and token to issue to the other nodes I want to join. Something like this:

kubeadm join --token 99385f.7b6e7e515416a041 192.168.122.100

我将在节点上运行它,并且它们将毫无问题地加入.第二天早上,这突然停止了工作.这是我现在运行命令时看到的:

I would run this on the nodes, and they would join without issue. The next morning, all of a sudden this stopped working. This is what I see when I run the command now:

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

It seems like the node I'm trying to join does successfully connect to the API server on the master node, but for some reason, it now fails to request a certificate.

有什么想法吗?

推荐答案

对我

sudo service kubelet restart

没有用. 我所做的是以下事情:

didn't work. What I did was the following:

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

我再次尝试了"kubeadm join ..."命令.这次节点没有任何投诉地加入了集群.

I tried again "kubeadm join ..." command. This time the nodes joined the cluster without any complaint.

我认为这是暂时的破解,但确实有效!

I think this is a temporary hack, but worked!

这篇关于kubeadm连接失败.无法请求签名证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆