Unable to connect to the server: x509: certificate has expired or is not yet valid

这篇具有很好参考价值的文章主要介绍了Unable to connect to the server: x509: certificate has expired or is not yet valid。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

手动更新所有证书,执行命令

kubeadm alpha certs renew all

更新用户配置

kubeadm alpha kubeconfig user --client-name=admin
kubeadm alpha kubeconfig user --org system:masters --client-name kubernetes-admin  > /etc/kubernetes/admin.conf
kubeadm alpha kubeconfig user --client-name system:kube-controller-manager > /etc/kubernetes/controller-manager.conf
kubeadm alpha kubeconfig user --org system:nodes --client-name system:node:$(hostname) > /etc/kubernetes/kubelet.conf
kubeadm alpha kubeconfig user --client-name system:kube-scheduler > /etc/kubernetes/scheduler.conf

用更新后的admin.conf替换/root/.kube/config文件

cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
[root@hadoop101 ~]# kubectl get nodes
Unable to connect to the server: x509: certificate has expired or is not yet valid
[root@hadoop101 ~]# cd /etc/kubernetes/pki
[root@hadoop101 pki]# openssl x509 -in apiserver.crt -noout -text |grep ' Not '
            Not Before: Aug  7 13:30:11 2021 GMT
            Not After : Aug  7 13:30:11 2022 GMT
[root@hadoop101 pki]# kubeadm alpha certs check-expiration
[check-expiration] Reading configuration from the cluster...
[check-expiration] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml'
[check-expiration] Error reading configuration from the Cluster. Falling back to default configuration

W0220 23:39:44.971317   11117 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
CERTIFICATE                EXPIRES                  RESIDUAL TIME   CERTIFICATE AUTHORITY   EXTERNALLY MANAGED
admin.conf                 Aug 07, 2022 13:30 UTC   <invalid>                               no
apiserver                  Aug 07, 2022 13:30 UTC   <invalid>       ca                      no
apiserver-etcd-client      Aug 07, 2022 13:30 UTC   <invalid>       etcd-ca                 no
apiserver-kubelet-client   Aug 07, 2022 13:30 UTC   <invalid>       ca                      no
controller-manager.conf    Aug 07, 2022 13:30 UTC   <invalid>                               no
etcd-healthcheck-client    Aug 07, 2022 13:30 UTC   <invalid>       etcd-ca                 no
etcd-peer                  Aug 07, 2022 13:30 UTC   <invalid>       etcd-ca                 no
etcd-server                Aug 07, 2022 13:30 UTC   <invalid>       etcd-ca                 no
front-proxy-client         Aug 07, 2022 13:30 UTC   <invalid>       front-proxy-ca          no
scheduler.conf             Aug 07, 2022 13:30 UTC   <invalid>                               no

CERTIFICATE AUTHORITY   EXPIRES                  RESIDUAL TIME   EXTERNALLY MANAGED
ca                      Aug 05, 2031 13:30 UTC   8y              no
etcd-ca                 Aug 05, 2031 13:30 UTC   8y              no
front-proxy-ca          Aug 05, 2031 13:30 UTC   8y              no
[root@hadoop101 pki]# kubeadm alpha certs renew all
[renew] Reading configuration from the cluster...
[renew] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml'
[renew] Error reading configuration from the Cluster. Falling back to default configuration

W0220 23:41:15.686121   11419 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
certificate embedded in the kubeconfig file for the admin to use and for kubeadm itself renewed
certificate for serving the Kubernetes API renewed
certificate the apiserver uses to access etcd renewed
certificate for the API server to connect to kubelet renewed
certificate embedded in the kubeconfig file for the controller manager to use renewed
certificate for liveness probes to healthcheck etcd renewed
certificate for etcd nodes to communicate with each other renewed
certificate for serving etcd renewed
certificate for the front proxy client renewed
certificate embedded in the kubeconfig file for the scheduler manager to use renewed
[root@hadoop101 pki]# ll
总用量 56
-rw-r--r-- 1 root root 1220 220 23:41 apiserver.crt
-rw-r--r-- 1 root root 1090 220 23:41 apiserver-etcd-client.crt
-rw------- 1 root root 1675 220 23:41 apiserver-etcd-client.key
-rw------- 1 root root 1679 220 23:41 apiserver.key
-rw-r--r-- 1 root root 1099 220 23:41 apiserver-kubelet-client.crt
-rw------- 1 root root 1675 220 23:41 apiserver-kubelet-client.key
-rw-r--r-- 1 root root 1025 87 2021 ca.crt
-rw------- 1 root root 1679 87 2021 ca.key
drwxr-xr-x 2 root root  162 87 2021 etcd
-rw-r--r-- 1 root root 1038 87 2021 front-proxy-ca.crt
-rw------- 1 root root 1675 87 2021 front-proxy-ca.key
-rw-r--r-- 1 root root 1058 220 23:41 front-proxy-client.crt
-rw------- 1 root root 1679 220 23:41 front-proxy-client.key
-rw------- 1 root root 1679 87 2021 sa.key
-rw------- 1 root root  451 87 2021 sa.pub
[root@hadoop101 pki]# openssl x509 -in apiserver.crt -noout -text |grep ' Not '
            Not Before: Aug  7 13:30:11 2021 GMT
            Not After : Feb 20 15:41:16 2024 GMT
[root@hadoop101 pki]# cd /etc/kubernetes
[root@hadoop101 kubernetes]# kubeadm alpha kubeconfig user --client-name=admin
I0220 23:44:51.209752   12126 version.go:252] remote version is much newer: v1.26.1; falling back to: stable-1.18
W0220 23:44:52.663332   12126 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN5RENDQWJDZ0F3SUJBZ0lCQURBTkJna3Foa2lHOXcwQkFRc0ZBREFWTVJNd0VRWURWUVFERXdwcmRXSmwKY201bGRHVnpNQjRYRFRJeE1EZ3dOekV6TXpBeE1Wb1hEVE14TURnd05URXpNekF4TVZvd0ZURVRNQkVHQTFVRQpBeE1LYTNWaVpYSnVaWFJsY3pDQ0FTSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnRVBBRENDQVFvQ2dnRUJBTmo4CkgrZW5lSEdWek9KTUJyK3dhQkxoOVhtTXVqSFpXcmVWT0ZxT0EvMENPdnllSEJ4dkJqNGM4SjRNeEJQd0R1NmQKMmEydXdKbHZpUm1ndWJIMllyT3VvY1hMem5jUUV4S2tzeG5KdzhocHVpMVAxK2tYd2hpaWFlRjhib25iTnFMWgovZ0RVQnB6aUI4ZkxGSE1lTXBmS3lYc0pWMjcxNG4xUnhVb1VobFlJaHpaNWZ2TlFYZUVXRkZxM1k2Rm5IUEFBClVoNUxhakNzc21NSVpuL0E4UUU5QlpqYTFXeEhlcHNGeEJoUTRiUFhnWXRWa0UwbEF0MzFnNVV4blhHSEU3OCsKazFNc3lvK0dOdVJRS2JUZHRkQ0Q2UzFwOWhnQ0JFSmdSeTFWOFV6ZkhabXZFVCttMk9WME9EY2w0SkxHWng4RApwbVZMa2J0bldhQ1lYOElxcVRjQ0F3RUFBYU1qTUNFd0RnWURWUjBQQVFIL0JBUURBZ0trTUE4R0ExVWRFd0VCCi93UUZNQU1CQWY4d0RRWUpLb1pJaHZjTkFRRUxCUUFEZ2dFQkFHdnB5cjNTQzRCRy9wTDA3b0pNMFFKWTkrZHIKWHhkYkROWS9oQmRzRXpiZWRkQnptZ0hnekF1eUN1UDE1SmZRSVA3YmxUZjdMTGF5Qk9EOHRPQ3dXdGhvM1VZNgpMSjN3TnRzTmE2MEFlaDd6aVVFaEVWdWJLekJFOEZLTUNMeitOZzk2YSsxRUhjeWZjU2YybTVaeFFUNWxaRk90CllpMjUzdFQzckpVMFdWcmtCeE1KOXY5YkxlMkpKWFVtLzdzSWJCWmVpdExXTEhNdkhYMDZMUWkwbHhxWGVhU3YKY0tLaEJCeGN1Q3poRk4wKzFxODVFcVJkS2JvTVQ1K1hRV0s1TGVORHd2K1luQ1k5Z0FHS0NCM2JwZ3JaTXdEdgozTFJTMC9ZeC8yWFdOZDZUNklYSlk5SWhYTitrK3ozYzhpbVFzTWtHWVVwWDVFbnNtQk5CUUplaGkwTT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
    server: https://192.168.10.101:6443
  name: kubernetes
contexts:
- context:
    cluster: kubernetes
    user: admin
  name: admin@kubernetes
current-context: admin@kubernetes
kind: Config
preferences: {}
users:
- name: admin
  user:
    client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tC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d1VVOEhJdENPQ0JDNEg2cmFia3ZwRGZONy9MWVFDRAp2SEZESUdvMXRkY2c0VlE2NFNsSzhYVU95ekRrZjM5ZjJRVkJaTVZGNzZockdNZlNkY0FlREJEZkRNbjYxajlQCkQ5QTBnV1VDZ1lCVGdicGFmVkpwWVA5UVU2YjdzV0Jpc3A1UDJZOHBJOGlNWW53ZUI4eGcvT2dlU0lEWk4yNUgKS2hKUW5IU0tMdFBWWGtPVXgrbG9LWnpudTBxZjhpMUhnU3dIdGpiZjNib1FhNGdmcFJOWVZFQlYzTGJ1eldTdApKVU5UR0FBRE9OV0lyMDN5RDZCMlNCMk9FUFpxYUNqUzVPZTZzV0RXalJvQ2Z0NmtGeU9nK2c9PQotLS0tLUVORCBSU0EgUFJJVkFURSBLRVktLS0tLQo=

[root@hadoop101 kubernetes]# kubeadm alpha kubeconfig user --org system:masters --client-name kubernetes-admin  > /etc/kubernetes/admin.conf
I0220 23:44:56.000673   12148 version.go:252] remote version is much newer: v1.26.1; falling back to: stable-1.18
W0220 23:44:57.284954   12148 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
[root@hadoop101 kubernetes]# kubeadm alpha kubeconfig user --client-name system:kube-controller-manager > /etc/kubernetes/controller-manager.conf
I0220 23:44:58.420659   12164 version.go:252] remote version is much newer: v1.26.1; falling back to: stable-1.18
W0220 23:44:59.647838   12164 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
[root@hadoop101 kubernetes]# kubeadm alpha kubeconfig user --org system:nodes --client-name system:node:$(hostname) > /etc/kubernetes/kubelet.conf
I0220 23:45:00.850679   12187 version.go:252] remote version is much newer: v1.26.1; falling back to: stable-1.18
W0220 23:45:02.317471   12187 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
[root@hadoop101 kubernetes]# kubeadm alpha kubeconfig user --client-name system:kube-scheduler > /etc/kubernetes/scheduler.conf
I0220 23:45:06.973889   12208 version.go:252] remote version is much newer: v1.26.1; falling back to: stable-1.18
W0220 23:45:07.855108   12208 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
[root@hadoop101 kubernetes]# cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
cp:是否覆盖"/root/.kube/config"? y
[root@hadoop101 kubernetes]# kubectl get nodes
NAME        STATUS   ROLES    AGE    VERSION
hadoop101   Ready    master   562d   v1.18.0
hadoop102   Ready    <none>   562d   v1.18.0
hadoop103   Ready    <none>   562d   v1.18.0
[root@hadoop101 kubernetes]# systemctl restart kube-apiserver
Failed to restart kube-apiserver.service: Unit not found.
[root@hadoop101 kubernetes]# systemctl restart kube-apiserver
Failed to restart kube-apiserver.service: Unit not found.
[root@hadoop101 kubernetes]# kubectl -n david-test get po -o wide
No resources found in david-test namespace.
[root@hadoop101 kubernetes]# kubectl get pod -o wide
NAME                    READY   STATUS    RESTARTS   AGE    IP           NODE        NOMINATED NODE   READINESS GATES
nginx-f89759699-qnfxv   1/1     Running   0          562d   10.244.2.3   hadoop103   <none>           <none>
[root@hadoop101 kubernetes]# kubectl get modes
error: the server doesn't have a resource type "modes"
[root@hadoop101 kubernetes]# kubectl get nodes
NAME        STATUS   ROLES    AGE    VERSION
hadoop101   Ready    master   562d   v1.18.0
hadoop102   Ready    <none>   562d   v1.18.0
hadoop103   Ready    <none>   562d   v1.18.0
[root@hadoop101 kubernetes]# kubectl get po -o wide
NAME                    READY   STATUS    RESTARTS   AGE    IP           NODE        NOMINATED NODE   READINESS GATES
nginx-f89759699-qnfxv   1/1     Running   0          562d   10.244.2.3   hadoop103   <none>           <none>
[root@hadoop101 kubernetes]#

k8s解决证书过期官方文档:https://kubernetes.io/zh-cn/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/
帮助文档: https://www.cnblogs.com/00986014w/p/13095628.html文章来源地址https://www.toymoban.com/news/detail-762033.html

到了这里,关于Unable to connect to the server: x509: certificate has expired or is not yet valid的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • EKS 解决Unable to connect to the server 问题

    报错内容如下 1、先配置日志查询我们的eks所属用户 2、查询日志 执行以下查询语句 3、查询当前主机aws configure 4、执行操作远程k8s 报错如下 5、降低kubectl版本 各版本下载地址 https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html

    2024年02月12日
    浏览(60)
  • svn: E170013: Unable to connect to a repository at URL ‘‘ svn: E230001: Server SSL certificate

    svn: E170013: Unable to connect to a repository at URL ‘https://127.0.0.1/svn/xxxx/trunk’ svn: E230001: Server SSL certificate verification failed: certificate issued for a different hostname, issuer is not trusted 意思是服务器的SSL证书验证失败,证书为不同主机名颁发。 解决方法:打开CMD并执行如下命令 然后会让你选

    2024年02月02日
    浏览(47)
  • Docker推送拉取镜像到Harbor报错:Get “https://198.30.0.111:8443/v2/“: tls: failed to verify certificate: x509:

    天行健,君子以自强不息;地势坤,君子以厚德载物。 每个人都有惰性,但不断学习是好好生活的根本,共勉! 文章均为学习整理笔记,分享记录为主,如有错误请指正,共同学习进步。 在docker中推送镜像到Harbor镜像仓库中,报错 内容如下 截图如下 使用docker推送镜像到

    2024年04月22日
    浏览(46)
  • K8S之Kuboard显示已导入【创建 X509KeyPair 失败】 tls: failed to find any PEM data in certificate input

    kuboard用着用着,突然发现,只是 已导入 状态,而不是 已就绪 的状态,且重新导入kubeconfig显示 【创建 X509KeyPair 失败】 tls: failed to find any PEM data in certificate input 的提示。 具体问题截图如下: 发现集群状态正常 发现pod状态也是运行正常的 也是OK的 既然都看上去正常,那么,

    2024年02月04日
    浏览(60)
  • unable to connect to the server: net/http: tls handshake timeout已解决

    在自己电脑上学习k8s,使用kind安装了一个集群,过了一段时间再打开发现了一个问题。 执行 kubectl get po 的时候有报错 查了半个小时也没解决,有说内存不够,也有说要重启服务的,也有说重启docker的,关闭交换分区的,还有代理不对什么的,都没有解决我的问题,最后我试

    2024年02月13日
    浏览(59)
  • kubectl命令报错:Unable to connect to the server: dial tcp XXX:16443: connect: no route to host

    前提 架构: keepalived+haproxy+kubernetes 问题说明 kubernetes集群好久不用了,今天打开集群执行一个 kubectl get nodes 命令,报错如下: Unable to connect to the server: dial tcp 192.168.2.XXX:16443: connect: no route to host 分析原因 出现这个问题几种原因, 集群坏了:如果报错的IP是master1的节点IP或虚

    2024年02月09日
    浏览(137)
  • kubesphere-- Unable to connect to the server: dial tcp 192.168.211.182:6443: no route to host

            最近鼓捣kubesphere单节点安装,部署服务,使用流水线用的好好的,有两次重启服务器突然显示kubesphere连接不上。初步排查,使用 kubectl get pods --all-namespaces 命令,显示kubectl不可用,缺少路由。 Unable to connect to the server: dial tcp 192.168.211.182:6443: connect: no route to host    

    2024年02月03日
    浏览(52)
  • docker login : x509: certificate signed by unknown authority

    docker login 登录harbor镜像仓库报错. 修改docker配置文件, 将访问的镜像仓库地址加入到docker的 /etc/docker/daemon.json 配置中. 新增参数 insecure-registries . 重启docker服务 systemctl restart docker 登录

    2024年02月11日
    浏览(64)
  • MINIO 配置https报错:x509:cannot validate certificate【已解决】

    为MINIO配置https时,首先按官方要求官网描述(How to secure access to MinIO server with TLS),将TLS的公私钥放到:{{HOME}}/.minio/certs 里。 注意: 私钥需要命名为:private.key 公钥需要命名为:public.crt (如果公钥是以pem格式结尾,可直接改为crt格式) 但配置完成后会遇到如下错误,x509:c

    2024年02月14日
    浏览(53)
  • 【Node.js】npm ERR! request to https://registry.npm.taobao.org/cnpm failed ... certificate has expired

    在使用NPM安装包的过程中,出现以下错误: 请求到的 https://registry.npm.taobao.org/cnpm 失败,原因是证书已经过期。 2024年1月22日,淘宝NPM镜像站的域名 registry.npm.taobao.org 的SSL证书过期。 清理NPM的缓存 切换到新的NPM镜像站 检查是否成功切换到新的镜像站 如果这个命令返回的是

    2024年02月20日
    浏览(228)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包