kubernetes 无法连接到服务器GKE/GCP x509:证书已过期或尚未生效

a5g8bdjr  于 2024-01-07  发布在  Kubernetes
关注(0)|答案(1)|浏览(146)

我无法连接到GKE集群。我有kubectl身份验证所需的一切。

  1. $ gke-gcloud-auth-plugin version
  2. {
  3. "kind": "ExecCredential",
  4. "apiVersion": "client.authentication.k8s.io/v1beta1",
  5. "spec": {
  6. "interactive": false
  7. },
  8. "status": {
  9. "expirationTimestamp": "2023-11-21T18:46:36Z",

字符串
第一个月

  1. $ kubectl get nodes
  2. E1121 21:07:03.903867 109630 memcache.go:265] couldn't get current server API group list: Get "https://35.230.71.198/api?timeout=32s": tls: failed to verify certificate: x509: certificate has expired or is not yet valid: current time 2023-11-21T21:07:03+03:00 is before 2023-11-22T06:42:11Z
  3. E1121 21:07:04.348742 109630 memcache.go:265] couldn't get current server API group list: Get "https://35.230.71.198/api?timeout=32s": tls: failed to verify certificate: x509: certificate has expired or is not yet valid: current time 2023-11-21T21:07:04+03:00 is before 2023-11-22T06:42:11Z
  4. E1121 21:07:04.765932 109630 memcache.go:265] couldn't get current server API group list: Get "https://35.230.71.198/api?timeout=32s": tls: failed to verify certificate: x509: certificate has expired or is not yet valid: current time 2023-11-21T21:07:04+03:00 is before 2023-11-22T06:42:11Z
  5. E1121 21:07:05.214094 109630 memcache.go:265] couldn't get current server API group list: Get "https://35.230.71.198/api?timeout=32s": tls: failed to verify certificate: x509: certificate has expired or is not yet valid: current time 2023-11-21T21:07:05+03:00 is before 2023-11-22T06:42:11Z
  6. E1121 21:07:05.648717 109630 memcache.go:265] couldn't get current server API group list: Get "https://35.230.71.198/api?timeout=32s": tls: failed to verify certificate: x509: certificate has expired or is not yet valid: current time 2023-11-21T21:07:05+03:00 is before 2023-11-22T06:42:11Z
  7. Unable to connect to the server: tls: failed to verify certificate: x509: certificate has expired or is not yet valid: current time 2023-11-21T21:07:05+03:00 is before 2023-11-22T06:42:11Z

hs1ihplo

hs1ihplo1#

我发现WSL没有与Windows相同的系统时间,不知道为什么,但运行hwclock -s解决了这个问题

相关问题