证书没过期,显示过期了

来源:7-11 为集群添加认证授权(下)

Ajistyle

2020-08-17

老师,请问下,我这个显示报错:证书过期了。但是查看证书却没有过期。

[root@node202 kubernetes]# journalctl -f -u kube-apiserver
– Logs begin at ÈÕ 2020-08-16 22:55:11 CST. –
8ÔÂ 17 10:27:09 node202 kube-apiserver[12503]: E0817 10:27:09.284664 12503 authentication.go:62] Unable to authenticate the request due to an error: x509: certificate has expired or is not yet valid
8ÔÂ 17 10:27:09 node202 kube-apiserver[12503]: E0817 10:27:09.484514 12503 authentication.go:62] Unable to authenticate the request due to an error: x509: certificate has expired or is not yet valid
8ÔÂ 17 10:27:09 node202 kube-apiserver[12503]: E0817 10:27:09.516085 12503 authentication.go:62] Unable to authenticate the request due to an error: x509: certificate has expired or is not yet valid
8ÔÂ 17 10:27:09 node202 kube-apiserver[12503]: E0817 10:27:09.516978 12503 authentication.go:62] Unable to authenticate the request due to an error: x509: certificate has expired or is not yet valid
8ÔÂ 17 10:27:09 node202 kube-apiserver[12503]: E0817 10:27:09.518097 12503 authentication.go:62] Unable to authenticate the request due to an error: x509: certificate has expired or is not yet valid
8ÔÂ 17 10:27:09 node202 kube-apiserver[12503]: E0817 10:27:09.540226 12503 authentication.go:62] Unable to authenticate the request due to an error: x509: certificate has expired or is not yet valid
8ÔÂ 17 10:27:09 node202 kube-apiserver[12503]: E0817 10:27:09.684325 12503 authentication.go:62] Unable to authenticate the request due to an error: x509: certificate has expired or is not yet valid

[root@node202 kubernetes]# openssl x509 -in kubernetes.pem -noout -text |grep ’ Not '
Not Before: Aug 17 02:22:00 2019 GMT
Not After : Aug 14 02:22:00 2029 GMT
[root@node202 kubernetes]#
[root@node202 kubernetes]#

写回答

1回答

刘果国

2020-08-17

这个错误应该是有人请求apiserver,apiserver检测到客户端的证书非法了。所以要看下客户端的证书是否ok

0
0

Docker+Kubernetes(k8s)微服务容器化实践

从开发到编排,快速,完整,深入的掌握微服务

2608 学习 · 607 问题

查看课程