IBM Sterling Connect:Direct : C:D WebService - Annotations to Create a Network Load Balancer (NLB) service: Difference between revisions

From Wiki
(Created page with "These annotations help tocreated on **AWS using a Network Load Balancer (NLB)**. == AWS Load Balancer Annotations == The following annotations define the Network Load Balancer behavior and configuration on AWS and must be setup the values.yaml of the Helm: <syntaxhighlight lang="yaml"> annotations: service.beta.kubernetes.io/aws-load-balancer-type: "nlb" service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: "ip" service.beta.kubernetes.io/aws-load-balanc...")
 
 
Line 5: Line 5:
The following annotations define the Network Load Balancer behavior and configuration on AWS and must be setup the values.yaml of the Helm:
The following annotations define the Network Load Balancer behavior and configuration on AWS and must be setup the values.yaml of the Helm:


<syntaxhighlight lang="yaml">
<small><syntaxhighlight lang="yaml">
annotations:
annotations:
   service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
   service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
Line 17: Line 17:
externalTrafficPolicy: "Local"
externalTrafficPolicy: "Local"
sessionAffinity: "ClientIP"
sessionAffinity: "ClientIP"
</syntaxhighlight>
</syntaxhighlight></small>


where:
where:

Latest revision as of 18:04, 24 April 2026

These annotations help tocreated on **AWS using a Network Load Balancer (NLB)**.

AWS Load Balancer Annotations

The following annotations define the Network Load Balancer behavior and configuration on AWS and must be setup the values.yaml of the Helm:

annotations:
  service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
  service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: "ip"
  service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "true"
  service.beta.kubernetes.io/aws-load-balancer-healthcheck-protocol: "TCP"
  service.beta.kubernetes.io/aws-load-balancer-healthcheck-port: "9443"
  service.beta.kubernetes.io/aws-load-balancer-internal: "true"
  service.beta.kubernetes.io/aws-load-balancer-target-group-attributes: stickiness.enabled=true,stickiness.type=source_ip
...
externalTrafficPolicy: "Local"
sessionAffinity: "ClientIP"

where:

  • The load balancer is an **internal AWS Network Load Balancer (NLB)** and is not internet-facing.
  • The **target type is IP**, allowing traffic to be routed directly to pod IPs.
  • **Cross-zone load balancing** is enabled to evenly distribute traffic across all Availability Zones.
  • **Health checks** are executed using the **TCP protocol on port 9443**.
  • **Session stickiness** is configured based on the **source IP**.
  • The setting `externalTrafficPolicy: Local` ensures that traffic is only routed to nodes with active pods, preserving the client IP.
  • This setup requires the **AWS Load Balancer Controller** to be properly installed and configured in the EKS cluster.

Ver também