• docker 报错:x509: certificate has expired or is not yet valid


    执行kubeadm join 出现报错 

    [root@weifeng02 shell]# kubeadm join --token 9e6996.ef3202709275b177 192.168.18.222:6443 --discovery-token-ca-cert-hash sha256:9a5cb02381282c29bfc44f980624473a68c07e3e5388eb14fb7439b8e5568703

    [discovery] Failed to request cluster info, will try again: [Get https://192.168.18.222:6443/api/v1/namespaces/kube-public/configmaps/cluster-info: x509: certificate has expired or is not yet valid]
    [discovery] Failed to request cluster info, will try again: [Get https://192.168.18.222:6443/api/v1/namespaces/kube-public/configmaps/cluster-info: x509: certificate has expired or is not yet valid]
    [discovery] Failed to request cluster info, will try again: [Get https://192.168.18.222:6443/api/v1/namespaces/kube-public/configmaps/cluster-info: x509: certificate has expired or is not yet valid]

    这种错误,一般都是本地系统时间错误导致报错证书过期,所以先查看本地系统时间

    # date "+%Y-%m-%d"  #系统时间2月15日,而正确时间应该是4月17日,所以很大可能就是该原因   

    2015-02-15

    解决:

    # ntpdate cn.pool.ntp.org               #同步一下时间

    17 Apr 17:40:45 ntpdate[32206]: step time server 202.112.29.82 offset 5262859.193967 sec

    # date "+%Y-%m-%d"                      #时间同步成功

    2015-04-17

    再执行 kubeadm join 成功

    [root@weifeng02 shell]# kubeadm join --token 9e6996.ef3202709275b177 192.168.18.222:6443 --discovery-token-ca-cert-hash sha256:9a5cb02381282c29bfc44f980624473a68c07e3e5388eb14fb7439b8e5568703

    [discovery] Successfully established connection with API Server "192.168.18.222:6443"

    This node has joined the cluster:
    * Certificate signing request was sent to master and a response
    was received.
    * The Kubelet was informed of the new secure connection details.

    Run 'kubectl get nodes' on the master to see this node join the cluster.

  • 相关阅读:
    Integer值判断是否相等问题
    Java连接Redis
    oracle 10G 没有 PIVOT 函数怎么办,自己写一个不久有了
    前端修炼(第三天)函数
    前端 JS 修炼(第一天)包装对象、作用域、创建对象
    linux oracle 启动全过程
    「android」webview中文乱码
    「dos」bat单条命令跨多行
    「股票」东方财富网公式-缩量
    「android」as javadoc乱码
  • 原文地址:https://www.cnblogs.com/weifeng1463/p/9050619.html
Copyright © 2020-2023  润新知