当K8s集群的证书过期后,集群将无法正常使用。现象如下:
[root@k8s-master ~]# kubectl get pods -A
The connection to the server 192.168.223.201:6443 was refused - did you specify the right host or port?
[root@k8s-master ~]# kubectl get nodes
The connection to the server 192.168.223.201:6443 was refused - did you specify the right host or port?
通过 kubeadm certs check-expiration 命令检查证书的过期时间,发现相关组件的认证证书都已过期。
[root@k8s-master ~]# kubeadm certs check-expiration
[check-expiration] Reading configuration from the cluster...
[check-expiration] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml'
[chec
当Kubernetes集群证书过期,导致服务异常。本文详细记录了处理过程:1. 使用kubeadm certs renew更新证书;2. 生成配置文件并指定cri-socket;3. 重新连接node节点。通过这些步骤,成功解决证书过期问题,确保集群正常运行。
订阅专栏 解锁全文
3434

被折叠的 条评论
为什么被折叠?



