我正在尝试使用Terraform创建GKE节点池
resource "google_container_node_pool" "node_pool" {
provider = google-beta
name = var.node_pool_name
location = var.region
cluster = var.cluster_name
node_count = var.k8s_workers_count
node_config {
machine_type = var.k8s_workers_shape
image_type = "COS"
service_account = google_service_account.sa.email
labels = {
name = var.node_pool_name
}
metadata = {
disable-legacy-endpoints = "true"
}
workload_metadata_config {
node_metadata = "GKE_METADATA_SERVER"
}
oauth_scopes = [
"https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/userinfo.email"
]
}
management {
auto_repair = true
auto_upgrade = true
}
}
3m TF控制台返回错误消息后
Error: Error reading NodePool "pool1" from cluster "cluster-1": Nodepool "pool1" has status "PROVISIONING" with message ""
Gcloud cli确实返回了提供状态
config:
diskSizeGb: 100
diskType: pd-standard
imageType: COS
labels:
name: pool1
machineType: n1-standard-4
metadata:
disable-legacy-endpoints: 'true'
oauthScopes:
- https://www.googleapis.com/auth/cloud-platform
- https://www.googleapis.com/auth/userinfo.email
serviceAccount:
shieldedInstanceConfig:
enableIntegrityMonitoring: true
initialNodeCount: 2
instanceGroupUrls:
- https://www.googleapis.com/compute/v1/projects/
management:
autoRepair: true
autoUpgrade: true
maxPodsConstraint:
maxPodsPerNode: '110'
name: pool1
podIpv4CidrSize: 24
selfLink: XXX
status: PROVISIONING
version: 1.13.11-gke.14
但是console.cloud.google.com显示状态为绿色,并且群集允许我创建部署等。有什么想法,Cloud Heroes?
更新:1:48 PM 2019/12/7-我能够运行TF脚本。不确定Google是否已修复它,还是我很幸运。
答案 0 :(得分:4)
https://status.cloud.google.com/上有关于此问题的一些信息:
在asia-east1-a,asia-east2-c,asia-northeast1-a,asia-northeast2-c,asia-south1-a,asia-southeast1-a,澳大利亚-southeast1-a中新建的GKE节点池,europe-north1-c,europe-west1-c,europe-west2-a,europe-west3-a,europe-west4-a,europe-west6-c,northamerica-northeast1-c,southamerica-east1-a,美国-central1-b,us-east1-a,us-east1-d,us-east2-a,us-east4-b,us-west1-a和us-west2-c已成功创建,但错误地显示为PROVISIONING。正在进行回滚将解决新节点池的问题。