V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
lifeforwater
V2EX  ›  Kubernetes

求助 k8s v1.13.9 kubelet.crt 证书问题

  •  
  •   lifeforwater · 2021-03-21 22:47:19 +08:00 · 1763 次点击
    这是一个创建于 1103 天前的主题,其中的信息可能已经有所发展或是发生改变。

    apiserver 一直在报:
    E1202 11:28:33.472590 1 authentication.go:65] Unable to authenticate the request due to an error: [x509: certificate has expired or is not yet valid, x509: certificate has expired or is not yet valid]

    执行:for crt in $(find /etc/kubernetes/pki/ -name "*.crt"); do openssl x509 -in $crt -noout -dates; done
    /etc/kubernetes/pki/ 下的证书都没过期

    执行:openssl x509 -in $(find / -name kubelet.crt) -noout -text |grep ' Not '
    /var/lib/kubelet/pki/kubelet.crt 过期了

    执行: openssl x509 -in /var/lib/kubelet/pki/kubelet-client-current.pem -noout -text |grep ' Not '
    kubelet-client-current.pem 没过期

    按照官方文档(最低 v1.16 ) https://v1-16.docs.kubernetes.io/zh/docs/tasks/tls/certificate-rotation/ 这里的方法未能解决,参数不支持

    求有空的 k8s 大佬帮忙看看,多谢!

    5 条回复    2021-03-22 11:25:49 +08:00
    anUglyDog
        1
    anUglyDog  
       2021-03-22 00:30:52 +08:00
    不要在 v2 讨论专业问题,因为这里没一个专业的。
    FucUrFrd
        2
    FucUrFrd  
       2021-03-22 01:17:34 +08:00 via Android
    1.13 神仙老破小系统

    不支持自动 renew
    你看手动升级吧,不需要停服










    github.com/kubernetes/kubeadm/issues/581
    Jrohy
        3
    Jrohy  
       2021-03-22 08:07:36 +08:00 via iPhone
    https://github.com/yuyicai/update-kube-cert
    这个旧版 k8s 都支持的,续签十年
    privil
        4
    privil  
       2021-03-22 09:03:34 +08:00
    @anUglyDog #1 二三楼啪啪啪打脸。
    joesonw
        5
    joesonw  
       2021-03-22 11:25:49 +08:00
    @privil 他的名字说的很明白了.
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1053 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 19:10 · PVG 03:10 · LAX 12:10 · JFK 15:10
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.