tencent cloud

Feedback

Ingress Annotation

Last updated: 2021-11-10 15:50:58

    You can use the following annotations to configure Ingress to implement more CLB capabilities.

    Annotation usage

    apiVersion: 
    kind: Ingress
    metadata:
      annotations:  
        kubernetes.io/ingress.class: "qcloud"
      name: test
    ........
    

    Annotation collection

    kubernetes.io/ingress.class

    展开&收起

    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"

    kubernetes.io/ingress.qcloud-loadbalance-id

    展开&收起

    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"

    ingress.cloud.tencent.com/loadbalance-nat-ipv6

    展开&收起

    Note:
    This is a read-only annotation that provides IPv6 address when the user configures or applies for NAT IPv6 CLB.

    ingress.cloud.tencent.com/loadbalance-ipv6

    展开&收起

    Note:
    This is a read-only annotation that provides IPv6 address when the user configures or applies for FullStack IPv6 CLB.

    kubernetes.io/ingress.internetChargeType

    展开&收起

    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:

  • TRAFFIC_POSTPAID_BY_HOUR pay-as-you-go by traffic on an hourly billing cycle
  • BANDWIDTH_POSTPAID_BY_HOUR: pay-as-you-go by bandwidth on an hourly billing cycle
  • Example:
    kubernetes.io/ingress.internetChargeType: "TRAFFIC_POSTPAID_BY_HOUR"

    kubernetes.io/ingress.internetMaxBandwidthOut

    展开&收起

    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"

    kubernetes.io/ingress.extensiveParameters

    展开&收起

    Note:
    Refer to Creating a CLB Instance to add custom parameters for the created a CLB instance.
    Example:

    • Creating a NAT64 IPv6 instance
      service.kubernetes.io/service.extensiveParameters: '{"AddressIPVersion":"IPV6"}'
    • Creating an IPv6 Instance
      service.kubernetes.io/service.extensiveParameters: '{"AddressIPVersion":"IPv6FullChain"}'
    • Purchasing a CTCC CLB
      service.kubernetes.io/service.extensiveParameters: '{"VipIsp":"CTCC"}'
    • Specifying a availability zone to create
      service.kubernetes.io/service.extensiveParameters: '{"ZoneId":"ap-guangzhou-1"}'

    kubernetes.io/ingress.subnetId

    展开&收起

    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"

    kubernetes.io/ingress.existLbId

    展开&收起

    Note:
    This annotation is used to specify the use of the existing CLB as the entry resource of the access layer.

    Note

    When using an existing CLB, you need to ensure that it does not include other listeners.

    Example:
    kubernetes.io/ingress.existLbId: "lb-342wppll"

    ingress.cloud.tencent.com/direct-access

    展开&收起

    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.

    ingress.cloud.tencent.com/enable-grace-shutdown

    展开&收起

    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"

    ingress.cloud.tencent.com/tke-service-config

    展开&收起

    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.

    ingress.cloud.tencent.com/tke-service-config-auto

    展开&收起

    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

    ingress.cloud.tencent.com/rewrite-support

    展开&收起

    Note:

  • To implement manual redirection, use this annotation in combination with kubernetes.io/ingress.http-rules and kubernetes.io/ingress.https-rules.
  • To implement automatic redirection, use this annotation in combination with ingress.cloud.tencent.com/auto-rewrite.
  • Example:
    ingress.cloud.tencent.com/rewrite-support: "true"

    ingress.cloud.tencent.com/auto-rewrite

    展开&收起

    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"

    ingress.cloud.tencent.com/cross-region-id

    展开&收起

    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:

    • Creating a CLB for remote access
      ingress.cloud.tencent.com/cross-region-id: "ap-guangzhou"
      ingress.cloud.tencent.com/cross-vpc-id: "vpc-646vhcjj"
    • Selecting an existing CLB for remote access
      ingress.cloud.tencent.com/cross-region-id: "ap-guangzhou"
      kubernetes.io/ingress.existLbId: "lb-342wppll"

    ingress.cloud.tencent.com/cross-vpc-id

    展开&收起

    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"

    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support