How to Deploy Kubernetes Services using Gateway API/AWS Load Balancer Controller
This tutorial contains a working example of exposing TCP services (LDAP/LDAPS + SSH) from a single-node k3s cluster running on an EC2 instance, using:
- Kubernetes Gateway API
- AWS Load Balancer Controller (LBC) for:
- NLB (L4) via
TCPRoute - ALB (L7) via
HTTPRoute/GRPCRoute(example file included)
- NLB (L4) via
The key implementation detail for k3s-on-EC2 with the default overlay networking (flannel): use instance targets + NodePorts for L4 routes. ClusterIP + pod IP targets won’t work unless pods are VPC-routable (AWS VPC CNI).
