k3s证书过期
Unable to connect to the server: x509: certificate has expired or is not yet valid
删掉 secret k3s-serving
kubectl --insecure-skip-tls-verify -n kube-system delete secrets k3s-serving
删掉 系统中的文件dynamic-cert.json
rm -f /var/lib/rancher/k3s/server/tls/dynamic-cert.json
重启 k3s 进程
sudo systemctl restart k3s
查看证书过期命令
for i in `ls /var/lib/rancher/k3s/server/tls/*.crt`; do echo $i; openssl x509 -enddate -noout -in $i; done
参考https://zhuanlan.zhihu.com/p/382198564
https://blog.csdn.net/weixin_43420337/article/details/109772958