我正在创建一个yaml配置来部署一个带有多节点池的gke集群。我希望能够创建一个新的集群,并将每个节点池放在不同的子网络中。能做到这一点吗。
我尝试过将子网络放在第二个节点池下的属性的不同部分,但是它出错了。下面是下面的错误。
消息:'{"ResourceType":"gcp-types/container-v1:projects.locations.clusters.nodePools","ResourceErrorCode":"400",“ResourceErrorMessage”:{“代码”:400,“消息”:“接收到的JSON有效负载无效。未知名称\“子网络\”:无法找到字段。“,”状态“:”INVALID_ARGUMENT“,INVALID_ARGUMENT”fieldViolations“:{”description“:”接收到的无效JSON有效负载“。未知名称\“子网络\”:找不到字段。“}}],”statusMessage“:”不好“
两个节点池的当前代码。第一个节点被创建,第二个错误被删除。
resources:
- name: myclus
type: gcp-types/container-v1:projects.locations.clusters
properties:
parent: projects/[PROJECT_ID]/locations/[ZONE/REGION]
cluster:
name: my-clus
zone: us-east4
subnetwork: dev-web ### leave this field blank if using the default network
initialClusterVersion: "1.13"
nodePools:
- name: my-clus-pool1
initialNodeCount: 1
config:
machineType: n1-standard-1
imageType: cos
oauthScopes:
- https://www.googleapis.com/auth/cloud-platform
preemptible: true
- name: my-clus
type: gcp-types/container-v1:projects.locations.clusters.nodePools
properties:
parent: projects/[PROJECT_ID]/locations/[ZONE/REGION]/clusters/$(ref.myclus.name)
subnetwork: dev-web ### leave this field blank if using the default
nodePool:
name: my-clus-pool2
initialNodeCount: 1
version: "1.13"
config:
machineType: n1-standard-1
imageType: cos
oauthScopes:
- https://www.googleapis.com/auth/cloud-platform
preemptible: true我喜欢预期的结果是在两个不同的子网络中有两个节点池。
发布于 2019-09-20 17:42:44
https://stackoverflow.com/questions/58028644
复制相似问题