云容器引擎 CCE-ENI负载均衡 ( ENI LoadBalancer ):使用kubectl创建-自动创建ELB

时间:2023-11-01 16:25:54

使用kubectl创建-自动创建ELB

ENI LoadBalancer Service仅支持独享型ELB,在创建Service时无需要指定nodeport。

apiVersion: v1kind: Servicemetadata:    name: example    annotations:        kubernetes.io/elb.class: performance        kubernetes.io/elb.autocreate:           '          {              "type": "public",              "bandwidth_name": "cce-bandwidth-1630813564682",              "bandwidth_chargemode": "traffic",              "bandwidth_size": 5,              "bandwidth_sharetype": "PER",              "eip_type": "5_bgp",              "available_zone": [                  "cn-north-4b"              ],              "l7_flavor_name": "L7_flavor.elb.s2.medium",              "l4_flavor_name": "L4_flavor.elb.s1.small"          }          'spec:    selector:        app: example    ports:        -   name: cce-service-0            targetPort: 80            port: 8082            protocol: TCP    type: LoadBalancer

详细的参数说明请参见表4

support.huaweicloud.com/usermanual-cce/cce_01_0114.html