To create a zonal backend service "backend-service-1" for a load balancer, run:
gdcloud compute backend-services create backend-service-1 \
--health-check=my-health-check \
--target-ports=UDP:80:8080
To create a global backend service "backend-service-1" for a load balancer, run:
gdcloud compute backend-services create backend-service-1 \
--health-check=my-health-check \
--target-ports=UDP:80:8080 \
--global
選用旗標
--global If set, the global backend service object is created.
--health-check string Name of the health check parameters object for this backend service.
--target-ports strings Comma-separated list of target ports that this backend service will translate, where each target port specifies the protocol, the port on the forwarding rule, and the port on the backend instance. Format: '{protocol}:{port}:{targetport}'.
--zone string Zone to use for this invocation. To preset the zone flag for all commands that require it, run: "gdcloud config set core/zone ZONE". The zone flag is available only in multi-zone environments.
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[],[],null,["# gdcloud compute backend-services create\n\nNAME\n----\n\ngdcloud compute backend-services create - Create backend services for a load balancer.\n\nSYNOPSIS\n--------\n\n gdcloud compute backend-services create BACKEND_SERVICE_NAME [flags]\n\n### EXAMPLES\n\n To create a zonal backend service \"backend-service-1\" for a load balancer, run:\n\n gdcloud compute backend-services create backend-service-1 \\\n --health-check=my-health-check \\\n --target-ports=UDP:80:8080\n\n To create a global backend service \"backend-service-1\" for a load balancer, run:\n\n gdcloud compute backend-services create backend-service-1 \\\n --health-check=my-health-check \\\n --target-ports=UDP:80:8080 \\\n --global\n\n### OPTIONAL FLAGS\n\n --global If set, the global backend service object is created.\n --health-check string Name of the health check parameters object for this backend service.\n --target-ports strings Comma-separated list of target ports that this backend service will translate, where each target port specifies the protocol, the port on the forwarding rule, and the port on the backend instance. Format: '{protocol}:{port}:{targetport}'.\n --zone string Zone to use for this invocation. To preset the zone flag for all commands that require it, run: \"gdcloud config set core/zone ZONE\". The zone flag is available only in multi-zone environments.\n\n### GDCLOUD WIDE FLAGS\n\nThese flags are available to all commands: `--configuration`, `--format`, `--help`, `--project`, `--quiet`.\n\nFor more information, see the [gdcloud CLI reference overview](/distributed-cloud/hosted/docs/latest/appliance/resources/gdcloud-reference/gdcloud) page."]]