k8s-service: How to launch the load balancer in private subnet?
I want make sure the ALB launched with the Kubernetes service backed by `k8s-service` will launch in private subnets. How do I do that? --- <ins datetime="2022-09-09T15:01:23Z"> <p><a href="https://support.gruntwork.io/hc/requests/109229">Tracked in ticket #109229</a></p> </ins>
The load balancer is controlled by the [AWS Load Balancer Controller](https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.4/), and you can control the configuration of the LB that is launched through the many annotations that it understands. Here is a link to the full annotation: https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.4/guide/ingress/annotations/ You can add any annotation that we don’t support within the `k8s-service` module using the [ingress_annotations](https://docs.gruntwork.io/reference/services/app-orchestration/kubernetes-service#ingress_annotations) input variable. With that said, for your particular question, setting the [expose_type](https://docs.gruntwork.io/reference/services/app-orchestration/kubernetes-service#expose_type) to `internal` should set the annotations for configuring an internal ALB that is only exposed to the VPC, which should accomplish your needs.