大网数据广告活动
服务器运维问答

Google cloud service account not found

· 52CE 我爱测

I have an infrastructure running on google cloud using GKE. Today the prometheus pods got evicted and were not able to recover. After describing the pod I found this error. Warning FailedMount 2m17s (x42 over 95m) kubelet, gke-pr…

问题原文

原帖链接 · Jorge Heleno · CC BY-SA 4.0

I have an infrastructure running on google cloud using GKE. Today the prometheus pods got evicted and were not able to recover. After describing the pod I found this error.

  Warning  FailedMount         2m17s (x42 over 95m)  kubelet, gke-production-default-pool-44cd6cd6-h9rw  Unable to mount volumes for pod "prometheus-6d7c45fc6-5zd5d_kube-system(86c0258f-81ed-11e9-93ac-42010af00102)": timeout expired waiting for volumes to attach or mount for pod "kube-system"/"prometheus-6d7c45fc6-5zd5d". list of unmounted volumes=[storage]. list of unattached volumes=[config storage prometheus-token-875gs]
  Warning  FailedAttachVolume  69s (x47 over 96m)    attachdetach-controller                             AttachVolume.Attach failed for volume "pvc-ff226d8b-3814-11e8-a63c-42010af001b0" : googleapi: Error 400: EXTERNAL_RESOURCE_NOT_FOUND - The resource '[email omitted]' of type 'serviceAccount' was not found.

Further investigation proven that the service account does not exist in the IAM service.

According to the google documentation supposedly by disabling and re-enabling the api service solves the problem.

The thing is, this operation will most likely delete the kubernetes cluster resources which I do not want to happen.

So the questions are:

  1. Is there another way of solving this issue? If so, how?
  2. Does this operation really delete all the resources?

Thanks everyone for taking the time to check this question.

已采纳解答

原帖链接 · Jorge Heleno · CC BY-SA 4.0

Apparently I was able to solve my own issue by undeleting the service account. This operation is not supported by gcloud cli but it is supported in the api. The request made was curl -X POST -H "Authorization: Bearer $(gcloud auth print-access-token)" "https://iam.googleapis.com/v1/projects/-/serviceAccounts/114592978558849211522:undelete"

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-05-29)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。