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

From Wiki
Revision as of 18:04, 24 April 2026 by Ebasso (talk | contribs) (→‎AWS Load Balancer Annotations)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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