Annotations

VNGCLOUDTypeDefault
/ignorebooleanfalse
/load-balancer-idstring
/load-balancer-namestringauto generate with rule
/package-idstringlbp-f562b658-0fd4-4fa6-9c57-c1a803ccbf86
/tagsstringMap
/schemeinternal / internet-facinginternet-facing
/security-groupsstringList
/inbound-cidrsstring0.0.0.0/0
/healthy-threshold-countinteger'3'
/unhealthy-threshold-countinteger'3'
/healthcheck-interval-secondsinteger'30'
/healthcheck-timeout-secondsinteger'5'
/healthcheck-protocolTCP / HTTP / HTTPS / PING-UDPTCP
/healthcheck-http-methodGET / POST / PUTGET
/healthcheck-pathstring"/"
/healthcheck-http-version1.0 / 1.11.0
/healthcheck-http-domain-namestring""
/healthcheck-portintegertraffic port
/success-codesstringList'200'
/idle-timeout-clientinteger50
/idle-timeout-memberinteger50
/idle-timeout-connectioninteger5
/pool-algorithmROUND_ROBIN / LEAST_CONNECTIONS / SOURCE_IPROUND_ROBIN
/target-node-labelsstringMapN/A
/enable-proxy-protocolstringListN/A

Traffic Routing

Traffic Routing can be controlled with following annotations:

  • vks.vngcloud.vn/ignore specifies Service type Loadbalancer is ignored by controller.

    vks.vngcloud.vn/ignore: "true"
    
  • vks.vngcloud.vn/load-balancer-id specifies the id of the load balancer.

    ⚠️ Warnings: If you specify this annotation, load-balancer will not auto recreate when delete.

    ⚠️ Warnings: If you want many ingress use a same load-balancer, we highly recommended use annotation vks.vngcloud.vn/load-balancer-name.

    vks.vngcloud.vn/load-balancer-id: "lb-xxxxxxxxxxxxxx"
    
  • vks.vngcloud.vn/load-balancer-name specifies the custom name to use for the load balancer.

    ℹ️ Info: Rule auto genearte load balancer name: ******__******

    ⚠️ Warnings: Name longer than 50 characters will be treated as an error.

    ⚠️ Warnings: Ingress with same this annotation value with use a same load-balancer.

    ⚠️ Warnings: Update this field will cause create/update another load-balancer and redundant resource (old load-balabncer).

    vks.vngcloud.vn/load-balancer-name: "custom-name"
    
  • vks.vngcloud.vn/package-id The ID of the network load-balancer package to be used for the service. If this annotation is not specified, the default package will be used.

    ⚠️ Warnings: Update this field after apply success will not effect.

    vks.vngcloud.vn/package-id: "lbp-c531bc55-27d7-4a3e-be0b-eac265658a50"
    
  • vks.vngcloud.vn/target-node-labels specifies which nodes to include in the target group registration.

    vks.vngcloud.vn/target-node-labels: "worker=vmonitor,kubernetes.io/os=linux"
    vks.vngcloud.vn/target-node-labels: "key=v1,key=v2" # => "key=v2"
    

Resource Tags

The VNGCLOUD Ingress Controller automatically applies following tags to the Load Balancer resources, it creates:

  • vks-cluster-ids: ${clusterID}_${clusterID}_${clusterID}

In addition, you can use annotations to specify additional tags

  • vks.vngcloud.vn/tags specifies additional tags that will be applied to vLB resources created.

    ⚠️ Warnings: When user update tags manual in portal, our agent will not sync the change (load balancer not update updateAt when update tags)

    ⚠️ Warnings: It'll update the config tag and append to the current tag.

    vks.vngcloud.vn/tags: "Environment=dev,Team=test"
    

Access control

Access control for LoadBalancer can be controlled with following annotations:

  • vks.vngcloud.vn/scheme specifies whether your LoadBalancer will be internet facing.

    vks.vngcloud.vn/scheme: "internal"
    
  • vks.vngcloud.vn/inbound-cidrs specifies the CIDRs that are allowed to access LoadBalancer.

    vks.vngcloud.vn/inbound-cidrs: "10.0.0.0/24"
    
  • vks.vngcloud.vn/security-groups specifies the securityGroups you want to attach to Node.

    ⚠️ Warnings: If you NOT specify this annotation, the controller will automatically create one security group, the security group will be attached to the Node and allow access from inbound-cidrs to the listen-ports.

    ⚠️ Warnings: If you specify this annotation, you need to ensure the security groups on your Node to allow inbound traffic from the load balancer.

    ⚠️ Warnings: If you specify this annotation, it'll configure only security group only include in this annotation. Ensure include them all here.

    vks.vngcloud.vn/security-groups: "sg-xxxx,sg-yyyyy"
    
  • vks.vngcloud.vn/idle-timeout-client Connection idle timeout is the maximum time a connection can remain open without any data transfer, after which the load balancer will close the connection. Range: (1-3600).

    vks.vngcloud.vn/idle-timeout-client: "51"
    
  • vks.vngcloud.vn/idle-timeout-member Backend member inactivity timeout in seconds. Range: (1-3600).

    vks.vngcloud.vn/idle-timeout-member: "51"
    
  • vks.vngcloud.vn/idle-timeout-connection Backend member connection timeout in seconds.

    vks.vngcloud.vn/idle-timeout-connection: "5"
    

Health Check

Health check on target groups can be controlled with following annotations:

Pool configuration

  • vks.vngcloud.vn/pool-algorithm The load balancing algorithm used to determine which backend server to send a request to.

    vks.vngcloud.vn/pool-algorithm: "SOURCE_IP"
    
  • vks.vngcloud.vn/enable-proxy-protocol Enable Proxy Protocol for the Load Balancer Pool.

    Assume you have a service nginx-ingress-controller:

    apiVersion: v1
    kind: Service
    metadata:
      name: nginx-ingress-controller-controller
      namespace: kube-system
    spec:
      ports:
      - name: http-service
        port: 80
        protocol: TCP
        targetPort: 80
      - name: https-service
        port: 443
        protocol: TCP
        targetPort: 443
      type: LoadBalancer
    

    You can enable Proxy Protocol for the Load Balancer Pool by adding the following annotation:

    vks.vngcloud.vn/enable-proxy-protocol: "http-service,https-service"