查看
openssl x509 -in /etc/kubernetes/pki/apiserver.crt -noout -text |grep ' Not '
或
sudo kubeadm certs check-expiration
备份
sudo cp -rp /etc/kubernetes /etc/kubernetes.bak
重新生成证书
sudo kubeadm certs renew all
重新生成配置文件
kubeadm init phase kubeconfig all
更新kubectl
sudo cp /etc/kubernetes/admin.conf ~/.kube/config
重启服务
sudo systemctl restart kubelet
验证