使用该附件的脚本

  1. chmod 755 update-kubeadm-cert.sh
  2. # 2.验证当集群CA证书及其他组件的有效期
  3. # - 方式1
  4. openssl x509 -in /etc/kubernetes/pki/ca.crt -noout -text | grep Not
  5. # Not Before: Jun 15 04:54:45 2022 GMT
  6. # Not After : Jun 12 04:54:45 2032 GMT
  7. # - 方式2(推荐)
  8. kubeadm certs check-expiration
  9. # 3.此处K8S环境中是使用 containerd 作为 CRI 运行时所以使用 update-kubeadm-cert-crictl.sh 代替 update-kubeadm-cert.sh (当运行时为dockershim时选择此脚本),非常注意
  10. ./update-kubeadm-cert-crictl.sh all
文档更新时间: 2023-11-23 09:48   作者:张尚