0
在Google云端平台中,我有一个包含三个运行实例的Container-Cluster。我现在想从我的终端连接,以便能够运行kubectl
命令。为此,我运行命令kubectl访问Google云容器引擎失败
gcloud container clusters get-credentials cluster-1 --zone europe-west1-b --project project-id
我正在使用真实的项目名称当然。这是在点击“连接群集”时仪表板显示的命令。此命令的输出是:
Fetching cluster endpoint and auth data.
kubeconfig entry generated for cluster-1.
但是当我运行kubectl
命令之后像kubectl cluster-info
我总是得到:
Unable to connect to the server: oauth2: cannot fetch token: 400 Bad Request
Response: {
"error" : "invalid_grant",
"error_description" : "Token has been revoked."
}
缺少什么我在这里? gcloud
命令如gcloud container clusters list
工作