更新时间:2025-04-03 GMT+08:00
ccictl create service loadbalancer
操作背景
创建指定名称的 LoadBalancer 类型 Service。
ccictl create service loadbalancer NAME [--tcp=port:targetPort] [--elb-id:targetElbID]
示例
# 新建名为 my-lbs 的 LoadBalancer 类型 Service ccictl create service loadbalancer my-lbs --tcp=5678:8080 --elb-id=xxx
选项
--allow-missing-template-keys 默认值:true
如果为 true,在模板中字段或映射键缺失时忽略模板中的错误。 仅适用于 golang 和 jsonpath 输出格式。
-h, --help
loadbalancer 操作的帮助命令。
-o, --output string
输出格式。可选值为: json、yaml、name、go-template、go-template-file、template、templatefile、jsonpath、jsonpath-as-json、jsonpath-file。
--save-config
如果为 true,当前对象的配置将被保存在其注解中。否则,注解将保持不变。 此标志在您希望后续对该对象执行 ccictl apply 时很有用。
--tcp strings
端口对可以指定为 "<端口>:<目标端口>"。
--template string
当 -o=go-template、-o=go-template-file 时使用的模板字符串或模板文件路径。 模板格式为 golang 模板 [http://golang.org/pkg/text/template/#pkg-overview]。
--elb-id string
elb服务实例id
ccictl选项亦可在子命令中生效,列表如下:
父主题: ccictl create