kublet启动之后使用bootstrap.config来生成kubelet.conf,但是如果apiserver的证书配置有问题,就会导致无法注册node成功, 报错如下
代码语言:javascript复制kubelet[32304]: server.go:261] failed to run Kubelet: cannot create certificate signing request: Post https://172.0.0.1:6443/apis/certificates.k8s.io/v1beta1/certificatesigningrequests: x509: certificate is valid for 127.0.0.1
注意apiserver的配置如下 kubernetes-csr.json一定要加上后面name这半段
代码语言:javascript复制 "names": [
{
"C": "CN",
"ST": "GuangDong",
"L": "GuangDong",
"O": "k8s",
"OU": "System"
}
]
另外就是apiserver的ip配置这里
代码语言:javascript复制--advertise-address=0.0.0.0
这里必须是这样的,不然报错让人搞到怀疑人生
(adsbygoogle = window.adsbygoogle || []).push({});