云部署管理器:内部负载均衡器创建问题

时间:2016-11-09 01:01:45

标签: google-cloud-platform gcloud

我正在使用以下内容尝试使用以下代码

通过Deployment Manager创建内部负载均衡器
- name:  {{ env["name"] }}-port389-healthcheck
type: compute.v1.healthChecks
properties:
    type: tcp
    tcpHealthCheck: {
    port: 389
    }

- name: {{ env["name"] }}-port389-backend-service
type: compute.beta.backendService
properties:
    healthChecks:
    - $(ref.{{ env["name"] }}-port389-healthcheck.selfLink)
    backends:
    - group: $(ref.{{ env['name'] }}-master-instance-groups-managed.instanceGroup)
    - group: $(ref.{{ env['name'] }}-slave-instance-groups-managed.instanceGroup)
    protocol: TCP
    region: {{ properties['region'] }}
    loadBalancingScheme: INTERNAL

- name: {{ env["name"] }}-port389-forwarding-rule
type: compute.beta.forwardingRule
properties:
    loadBalancingScheme: INTERNAL
    ports: 
    - 389
    network: default
    region: {{ properties["region"] }}
    backendService: $(ref.{{ env["name"] }}-port389-backend-service.selfLink)

使用以下

运行时出错
Waiting for create operation-1478651694403-540d36cfdcdb9-cba25532-08697daf...failed.
ERROR: (gcloud.beta.deployment-manager.deployments.create) Error in Operation operation-1478651694403-540d36cfdcdb9-cba25532-08697daf:
errors:
- code: RESOURCE_ERROR
location: /deployments/forgerock/resources/forgerock-frontend-port389-backend-service-us-central1
message: 'Unexpected response from resource of type compute.beta.backendService:
    400 {"code":400,"errors":[{"domain":"global","message":"Invalid value for field
    ''resource.loadBalancingScheme'': ''INTERNAL''. Load balancing scheme must be
    external for a global backend service.","reason":"invalid"}],"message":"Invalid
    value for field ''resource.loadBalancingScheme'': ''INTERNAL''. Load balancing
    scheme must be external for a global backend service.","statusMessage":"Bad Request","requestPath":"https://www.googleapis.com/compute/beta/projects/carbide-tenure-557/global/backendServices"}'

似乎是使用https://www.googleapis.com/compute/beta/projects/carbide-tenure-557/global/backendServices代替https://www.googleapis.com/compute/beta/projects/carbide-tenure-557/backendServices

进行创建

我知道这是测试版功能,但尝试使用GDM而不是gcloud命令和GDM

的混合来开发此解决方案

1 个答案:

答案 0 :(得分:1)

对于类型而不是#if ARG_MAX + 0 > 131072 使用:

<强> type: compute.beta.backendService

相关问题