k8s创建server报错-x509: certificate has expired or is not yet valid
2022/6/14 23:20:45
本文主要是介绍k8s创建server报错-x509: certificate has expired or is not yet valid,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
前提:k8s证书都是正常的没有过期,前段时间做过处理。 原因:替换了k8s证书后没有对kube-apiserver主键重启,还使用的是缓存信息,重启一下问题解决 systemctl restart kube-apiserver.service问题:kubectl create -f apply-server.yaml
Error from server: error when creating "ld-manage-ui-service.yaml": Get https://192.168.1.5:6443/api/v1/namespaces/chinapopin-system-test/resourcequotas: x509: certificate has expired or is not yet valid
查看apiserver日志报错,如下:
[root@master242 ld-manage-ui]# systemctl status kube-apiserver.service
● kube-apiserver.service - Kubernetes API Service
Loaded: loaded (/etc/systemd/system/kube-apiserver.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2021-06-03 09:38:55 CST; 1 years 0 months ago
Docs: https://github.com/GoogleCloudPlatform/kubernetes
Main PID: 8236 (kube-apiserver)
Tasks: 20
Memory: 551.3M
CGroup: /system.slice/kube-apiserver.service
└─8236 /usr/local/bin/kube-apiserver --logtostderr=true --v=0 --etcd-servers=https://192.168.1.5:2379,https://192.168.1.6:2379,https://192.168.1.7:2379 --advertise-address=192.168.1...
Jun 14 16:04:21 master242 kube-apiserver[8236]: E0614 16:04:21.006139 8236 available_controller.go:231] v1beta1.extensions failed with: Put https://192.168.1.5:6443/apis/apiregistration...not yet valid
Jun 14 16:04:21 master242 kube-apiserver[8236]: I0614 16:04:21.006162 8236 logs.go:41] http: TLS handshake error from 192.168.1.5:54168: remote error: tls: bad certificate
Jun 14 16:04:21 master242 kube-apiserver[8236]: I0614 16:04:21.944058 8236 logs.go:41] http: TLS handshake error from 192.168.1.5:54180: remote error: tls: bad certificate
Jun 14 16:04:21 master242 kube-apiserver[8236]: E0614 16:04:21.944099 8236 reflector.go:201] k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/factory.go:72: Failed to list *ex...
Jun 14 16:04:22 master242 kube-apiserver[8236]: I0614 16:04:22.949660 8236 logs.go:41] http: TLS handshake error from 192.168.1.5:54192: remote error: tls: bad certificate
Jun 14 16:04:22 master242 kube-apiserver[8236]: E0614 16:04:22.949696 8236 reflector.go:201] k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/factory.go:72: Failed to list *ex...
Jun 14 16:04:23 master242 kube-apiserver[8236]: I0614 16:04:23.955399 8236 logs.go:41] http: TLS handshake error from 192.168.1.5:54240: remote error: tls: bad certificate
Jun 14 16:04:23 master242 kube-apiserver[8236]: E0614 16:04:23.955470 8236 reflector.go:201] k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/factory.go:72: Failed to list *ex...
Jun 14 16:04:24 master242 kube-apiserver[8236]: I0614 16:04:24.960801 8236 logs.go:41] http: TLS handshake error from 192.168.1.5:54254: remote error: tls: bad certificate
Jun 14 16:04:24 master242 kube-apiserver[8236]: E0614 16:04:24.960856 8236 reflector.go:201] k8s.io/kubernetes/pkg/client/informers/informers_generated/internalversion/factory.go:72: Failed to list *ex...
这篇关于k8s创建server报错-x509: certificate has expired or is not yet valid的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-15在Kubernetes (k8s) 中搭建三台 Nginx 服务器怎么实现?-icode9专业技术文章分享
- 2024-11-05基于Kubernetes的自定义AWS云平台搭建指南
- 2024-11-05基于Kubernetes Gateway API的现代流量管理方案
- 2024-11-05在Kubernetes上部署你的第一个应用:Nginx服务器
- 2024-11-05利用拓扑感知路由控制Kubernetes中的流量
- 2024-11-05Kubernetes中的层次命名空间:更灵活的资源管理方案
- 2024-11-055分钟上手 Kubernetes:精简实用的 Kubectl 命令速查宝典!
- 2024-10-30K8s 容器的定向调度与亲和性
- 2024-10-28云原生周刊:K8s未来三大发展方向 丨2024.10.28
- 2024-10-25亚马逊弹性Kubernetes服务(EKS)实战:轻松搭建Kubernetes平台