环境信息:
K3s 版本: v1.22.13 +k3s1
节点 CPU 架构、操作系统和版本::
Linux gcp-xjp-asia-k3sserver-prod-0001 5.18.14-1.el7.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 22 12:52:41 EDT 2022 x86_64 x86_64 x86_64 GNU/Linux
集群配置:
3 servers, 10 agents
问题描述:
- 出现告警
Prometheus出现告警提示apiserver客户端证书过期
- 日志详情
三台k3s-server中有且只有一台的/var/log/message日志出现以下报错(重启报错节点的k3s时这个日志会漂移到另一台k3s-server):
Sep 4 02:13:16 gcp-xjp-asia-k3sserver-prod-0001 k3s: E0904 02:13:16.946268 6241 authentication.go:63] “Unable to authenticate the request” err=“[x509: certificate has expired or is not yet valid: current time 2024-09-04T02:13:16Z is after 2024-09-03T02:17:24Z, verifying certificate SN=3019711947317328306, SKID=, AKID=F5:E0:CB:AE:AC:D8:4F:56:F1:AD:A9:41:FA:A8:AA:CD:59:9E:A1:DC failed: x509: certificate has expired or is not yet valid: current time 2024-09-04T02:13:16Z is after 2024-09-03T02:17:24Z]”
- 集群现状
目前所有节点的工作都正常,但是一直找不到是哪个进程或者应用调用apiserver时使用了过期的客户端证书
复现步骤:
- 安装 K3s 的命令:
预期结果:
实际结果:
附加上下文/日志:
日志