Instance Mode (default) needs to have type:NodePort on backend services
This has the unfortunate consequence that ports between 1-1024 cannot be used, as they are "system" ports, restricted by the host OS.
Our solution is to create a new Service when alb is selected (in Instance mode, see alb.ingress.kubernetes.io/target-type), that has the following behavior:
Picks random ports for the exposed routes/interfaces
Use NodePort for type
Use names to reference the backend-service from the Ingress resources
Forward traffic to pod/container-port as the ClusterIP service does.
The ALB (AWS Load Balancer) has some unique requirements. As described here: https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.8/how-it-works/;
type:NodePort
on backend servicesThis has the unfortunate consequence that ports between 1-1024 cannot be used, as they are "system" ports, restricted by the host OS.
Our solution is to create a new Service when
alb
is selected (in Instance mode, seealb.ingress.kubernetes.io/target-type
), that has the following behavior: