QUOTA_EXCEEDED
policy
resource_error
ai_generated
true
错误:服务账号密钥超出限制。每个服务账号最多允许10个密钥。
Error: Service account key limit exceeded. Maximum number of keys for service account: 10.
ID: policy/gcp-service-account-key-limit-exceeded
85%修复率
88%置信度
1证据数
2023-06-15首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| GCP IAM API v1 | active | — | — | — |
| gcloud CLI 400.0.0 | active | — | — | — |
| Google Cloud SDK 4.0.0 | active | — | — | — |
根因分析
GCP 对每个服务账号强制执行10个用户管理密钥的硬性限制;尝试创建第11个密钥会失败。
English
GCP enforces a hard limit of 10 user-managed keys per service account; attempting to create an 11th key fails.
官方文档
https://cloud.google.com/iam/docs/creating-managing-service-account-keys解决方案
-
使用 gcloud 删除未使用的密钥:`gcloud iam service-accounts keys list [email protected]` 然后 `gcloud iam service-accounts keys delete KEY_ID [email protected]` 以释放槽位。
-
对于外部工作负载,使用工作负载身份联合而不是服务账号密钥:配置工作负载身份池和提供程序。
-
为额外的工作负载创建一个新的服务账号并分配相同的角色。
无效尝试
常见但无效的做法:
-
70% 失败
The limit is per service account, not a global quota; deleting keys frees slots but recreating without cleanup still hits the limit if you exceed 10.
-
60% 失败
Reusing keys increases security risk and doesn't solve the underlying quota issue; you still need separate keys for different workloads.
-
90% 失败
This limit is not adjustable via quota increase requests; it's a hard platform limit that cannot be changed.