编程知识 cdmana.com

Introduction to k8s

    kubeadm Installed kubernetes The certificate validity of the cluster certificate is one year , After expired kubectl The command will not work properly , In the cluster pod There will be problems with the operation .kubelet If you execute an order, you will report an error :

Unable to connect to the server: x509: certificate has expired or is not yet valid: current time 2020-12-23T10:00:11+08:00 is after 2020-12-10T10:57:27Z

1、 Check expiration date

kubeadm certs check-expiration

K8S introduction ------ Change certificate

2、 Certificate backup

cp -rp /etc/kubernetes /etc/kubernetes.bak

3、 Regenerate Certificate

kubeadm certs renew all

K8S introduction ------ Change certificate

4、 restart kubelet

systemctl restart kubelet

5、 Re check the expiration time

kubeadm certs check-expiration
K8S introduction ------ Change certificate

版权声明
本文为[osc_ 0k23td2u]所创,转载请带上原文链接,感谢
https://cdmana.com/2020/12/20201225124124200l.html

Scroll to Top