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-12-23云原生周刊:利用 eBPF 增强 K8s
- 2024-12-20/kubernetes 1.32版本更新解读:新特性和变化一目了然
- 2024-12-19拒绝 Helm? 如何在 K8s 上部署 KRaft 模式 Kafka 集群?
- 2024-12-16云原生周刊:Kubernetes v1.32 正式发布
- 2024-12-13Kubernetes上运行Minecraft:打造开发者平台的例子
- 2024-12-12深入 Kubernetes 的健康奥秘:探针(Probe)究竟有多强?
- 2024-12-10运维实战:K8s 上的 Doris 高可用集群最佳实践
- 2024-12-022024年最好用的十大Kubernetes工具
- 2024-12-02OPA守门人:Kubernetes集群策略编写指南
- 2024-11-26云原生周刊:K8s 严重漏洞