To create backend "my-backend" for a load balancer, run:
gdcloud compute backends create my-backend \
--cluster-name="user-vm-1-cluster" \
--labels=app=web,rev=v1.2
DRAPEAUX REQUIS
--labels strings Selector defining which endpoints (Pods or VMs) to use for this backend.
INDICATEURS FACULTATIFS
--cluster-name string Name of the Kubernetes cluster that the scope of the defined selectors are limited to.
--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.
OPTIONS GCLOUD GÉNÉRALES
Ces options sont disponibles pour toutes les commandes : --configuration, --format, --help, --project, --quiet.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[[["\u003cp\u003eThis command creates backends for a load balancer within a specified Kubernetes cluster.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e--labels\u003c/code\u003e flag is required to define the endpoints (Pods or VMs) used by the backend.\u003c/p\u003e\n"],["\u003cp\u003eThe optional \u003ccode\u003e--cluster-name\u003c/code\u003e flag limits the scope of the selectors to a specific cluster.\u003c/p\u003e\n"],["\u003cp\u003eThe command can also utilize the optional \u003ccode\u003e--zone\u003c/code\u003e flag in multi-zone environments to specify the target zone.\u003c/p\u003e\n"],["\u003cp\u003eThe backend configuration created will require the user to provide a \u003ccode\u003eBACKEND_NAME\u003c/code\u003e as an argument to the command.\u003c/p\u003e\n"]]],[],null,["# gdcloud compute backends create\n\nNAME\n----\n\ngdcloud compute backends create - Create backends for a load balancer.\n\nSYNOPSIS\n--------\n\n gdcloud compute backends create BACKEND_NAME [flags]\n\n### EXAMPLES\n\n To create backend \"my-backend\" for a load balancer, run:\n\n gdcloud compute backends create my-backend \\\n --cluster-name=\"user-vm-1-cluster\" \\\n --labels=app=web,rev=v1.2\n\n### REQUIRED FLAGS\n\n --labels strings Selector defining which endpoints (Pods or VMs) to use for this backend.\n\n### OPTIONAL FLAGS\n\n --cluster-name string Name of the Kubernetes cluster that the scope of the defined selectors are limited to.\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/gdch/resources/gdcloud-reference/gdcloud) page."]]