在无缝地工作了至少半年之后,今天意外地发生了这种情况。 kubectl
对我所有 GKE 集群的调用都返回了:
Unable to connect to the server: x509: certificate has expired or is not yet valid: current time 2021-03-10T15:02:50+02:00 is after 2020-07-24T00:21:03Z
我尝试重新运行 gcloud auth login
并使用 gcloud container clusters get-credentials
重新检索集群凭据......没有任何效果。
我尝试手动运行 gcloud config config-helper
,这实际上表明令牌大约在一小时前到期...
但我不明白为什么。
我错过了什么?
答案 0 :(得分:1)
我没有找到实际原因,但修复它 - 删除然后重新安装 Google Cloud SDK,如下所述:https://cloud.google.com/sdk/docs/install