You can use the following annotations to configure Ingress to implement more CLB capabilities.
apiVersion:
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: "qcloud"
name: test
........
Note:
This annotation is used to configure the Ingress type for the component management that is not configured with the annotation or the Ingress resource whose annotation content is qcloud.
Example:kubernetes.io/ingress.class: "qcloud"
Note:
This is a read-only annotation that provides the LoadBalanceId referenced by the current Ingress.
Example:kubernetes.io/ingress.qcloud-loadbalance-id: "lb-3imskkfe"
Note:
This is a read-only annotation that provides IPv6 address when the user configures or applies for NAT IPv6 CLB.
Note:
This is a read-only annotation that provides IPv6 address when the user configures or applies for FullStack IPv6 CLB.
Note:
This annotation is used to specify the CLB payment mode when a CLB is created. Please use it with kubernetes.io/ingress.internetMaxBandwidthOut
annotation.
Valid values:
kubernetes.io/ingress.internetChargeType: "TRAFFIC_POSTPAID_BY_HOUR"
Note:
This annotation is used to specify the maximum outbound bandwidth of the CLB when a CLB is created, which applies only to public network CLB instances. Please use it with kubernetes.io/ingress.internetChargeType
annotation.
Valid values:
Value range: 0-2,048 Mbps
Example:kubernetes.io/ingress.internetMaxBandwidthOut: "2048"
Note:
Refer to Creating a CLB Instance to add custom parameters for the created a CLB instance.
Example:
service.kubernetes.io/service.extensiveParameters: '{"AddressIPVersion":"IPV6"}'
service.kubernetes.io/service.extensiveParameters: '{"AddressIPVersion":"IPv6FullChain"}'
service.kubernetes.io/service.extensiveParameters: '{"VipIsp":"CTCC"}'
service.kubernetes.io/service.extensiveParameters: '{"ZoneId":"ap-guangzhou-1"}'
Note:
This annotation is used to specify the creation of a private network CLB, and specify the subnet where the CLB locates.
Example:kubernetes.io/ingress.subnetId: "subnet-3swgntkk"
Note:
This annotation is used to specify the use of the existing CLB as the entry resource of the access layer.
NoteWhen using an existing CLB, you need to ensure that it does not include other listeners.
Example:kubernetes.io/ingress.existLbId: "lb-342wppll"
Note:
You can use this annotation to achieve CLB-to-Pod direct access in layer 7. Pay attention to the service dependency of directly access under different networks.
Example:
For details, see Using Services with CLB-to-Pod Direct Access Mode.
Note:
You can use this annotation to gracefully shut down the workload in access layer. When the Pod is in the “Terminating” state, the workload will not be removed directly but the weight will become 0. It is used together with the PreStop feature of the workload to control the traffic when the workload is shut down.
Example:ingress.cloud.tencent.com/enable-grace-shutdown: "true"
Note:
This annotation is used to set the CLB related configurations through tke-service-config, including listeners, forwarding rules, etc.
Example:ingress.cloud.tencent.com/tke-service-config: "nginx-config"
. For more information, see Using TKEServiceConfig to Configure CLBs.
Note:
You can use this annotation to automatically create the TkeServiceConfig resource and provide a configuration template for user to configure as needed.
Example:ingress.cloud.tencent.com/tke-service-config-auto: "true"
. For more information, see Using TKEServiceConfig to Configure CLBs
Note:
kubernetes.io/ingress.http-rules
and kubernetes.io/ingress.https-rules
.ingress.cloud.tencent.com/auto-rewrite
.ingress.cloud.tencent.com/rewrite-support: "true"
Note:
This annotation is used to provide automatic redirection for HTTP ports. For all forwarding rules declared on HTTPS ports, corresponding redirection rules are created. You need use it in combination with ingress.cloud.tencent.com/rewrite-support
annotation to enable redirection management capabilities.
Example:ingress.cloud.tencent.com/auto-rewrite: "true"
Note:
This annotation specifies the source region for Ingress cross-region binding. It should be used in combination with kubernetes.io/ingress.existLbId
or ingress.cloud.tencent.com/cross-vpc-id
.
Example:
ingress.cloud.tencent.com/cross-region-id: "ap-guangzhou"
ingress.cloud.tencent.com/cross-vpc-id: "vpc-646vhcjj"
ingress.cloud.tencent.com/cross-region-id: "ap-guangzhou"
kubernetes.io/ingress.existLbId: "lb-342wppll"
Note:
This annotation specifies the VPC to access for Ingress cross-region binding. It can be used together with ingress.cloud.tencent.com/cross-region-id
annotation to specify the VPC of other region.
>! This annotation applies to the CLB created and managed by TKE. It is invalid for scenarios that use the existing CLB.
>
Example:
Creating CLB for remote access:ingress.cloud.tencent.com/cross-region-id: "ap-guangzhou"
ingress.cloud.tencent.com/cross-vpc-id: "vpc-646vhcjj"
Was this page helpful?