Updated on 2025-04-03 GMT+08:00

ccictl create service loadbalancer

Scenario

Create a LoadBalancer Service with a specified name.

ccictl create service loadbalancer NAME [--tcp=port:targetPort] [--elb-id:targetElbID]

Examples

# Create a LoadBalancer Service named my-lbs.
ccictl create service loadbalancer my-lbs --tcp=5678:8080 --elb-id=xxx

Options

--allow-missing-template-keys     Default: true

If the value is true, the error in the template is ignored when a field or mapping key is missing in the template. This option applies only to the Golang and JSONPath output formats.

-h, --help

Help information for create service loadbalancer

-o, --output string

Output format. The value options include json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, and jsonpath-file.

--save-config

If the value is true, the configuration of the object is saved in its annotation. Otherwise, the annotation remains unchanged. This flag is useful when you want to run the ccictl apply command on the object.

--tcp strings

The port pair can be specified as "<port>:<target port>".

--template string

Template character string or template file path used when -o is set to go-template or go-template-file. The Golang template format is [http://golang.org/pkg/text/template/#pkg-overview].

--elb-id string

Elastic load balancer ID

The following ccictl options can also be used in subcommands:

Parent command options