Overview
By default, a public CLB is automatically created during installation to handle traffic, but you can also use the TKE service annotation to customize the CLB for Nginx Ingress Controller. This document introduces the method for customization.
Using Private Network CLB
For example, if you want to change the CLB to a private network CLB, the sample code in values.yaml
is as follows:
controller:
service:
annotations:
service.kubernetes.io/qcloud-loadbalancer-internal-subnetid: 'subnet-xxxxxx'
Using Existing CLBs
You can also directly create a CLB in the CLB console according to your own needs (such as the custom instance specifications, ISP type, billing mode, and bandwidth limit), and then reuse this CLB with annotations in values.yaml
. For details, refer to Using Existing CLBs. controller:
service:
annotations:
service.kubernetes.io/tke-existed-lbid: 'lb-xxxxxxxx'
Note:
When a CLB instance is created in the CLB console, the selected VPC network must be consistent with that of the cluster.
Using Private and Public Network CLBs
If you need Nginx Ingress to use both public and private network CLBs to handle traffic simultaneously, you can configure Nginx Ingress to use two services. By default, a public network CLB service will be created. If you also need a private network CLB service, you can configure the internal service by following these steps:
controller:
service:
internal:
enabled: true
annotations:
service.kubernetes.io/qcloud-loadbalancer-internal-subnetid: "subnet-xxxxxxxx"
Apakah halaman ini membantu?