[英]GKE autopilot cluster creation failure
我正在嘗試在 GCP 中使用 terraform 創建作曲家環境,我可以看到它在一個項目中失敗,同時在自動駕駛模式下創建 Kubernetes 集群; 它在我們以相同方式部署的其他 2 個項目中運行良好。
因此,我也嘗試以手動方式創建 autopilot kubernetes 集群,但我們無法跟蹤它的問題,因為它僅顯示以下錯誤:
從命令行嘗試時出錯:
gcloud container clusters create-auto test \
--region europe-west2 \
--project=project-id
注意:Pod 地址范圍限制了集群的最大大小。 請參考https://cloud.google.com/kubernetes-engine/docs/how-to/flexible-pod-cidr了解如何優化 IP 地址分配。 在 europe-west2 中創建集群測試...正在部署集群...完成。
ERROR: (gcloud.container.clusters.create-auto) Operation [<Operation
clusterConditions: [<StatusCondition
canonicalCode: CanonicalCodeValueValuesEnum(UNKNOWN, 2)
message: 'Failed to create cluster'>]
detail: 'Failed to create cluster'
endTime: '2022-05-31T20:00:07.8398558Z'
error: <Status
code: 2
details: []
message: 'Failed to create cluster'>
name: 'operation-1654027061293-a14298fa'
nodepoolConditions: []
operationType: OperationTypeValueValuesEnum(CREATE_CLUSTER, 1)
progress: <OperationProgress
metrics: [<Metric
intValue: 12
name: 'CLUSTER_CONFIGURING'>, <Metric
intValue: 12
name: 'CLUSTER_CONFIGURING_TOTAL'>, <Metric
intValue: 9
name: 'CLUSTER_DEPLOYING'>, <Metric
intValue: 9
name: 'CLUSTER_DEPLOYING_TOTAL'>]
stages: []>
selfLink: 'https://container.googleapis.com/v1/projects/projectid/locations/europe-west2/operations/operation-1654027061293-a14298fa'
startTime: '2022-05-31T19:57:41.293067757Z'
status: StatusValueValuesEnum(DONE, 3)
statusMessage: 'Failed to create cluster'
targetLink: 'https://container.googleapis.com/v1/projects/projectid/locations/europe-west2/clusters/test'
zone: 'europe-west2'>] finished with error: Failed to create cluster
服務帳號“service-xxxxxxxx@container-engine-robot.iam.gserviceaccount.com”需要角色 Kubernetes Engine Service Agent (roles/container.serviceAgent),這會導致 k8s 集群創建失敗; 授予權限后,我們能夠創建集群
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.