AWS Load Balancer Controller deployment to force creation of application Load Balancer?

0

I deploy AWS Load Balancer Controller and it creates and configures an application load balancer when I deploy an ingress, which is very convenient. However, the application load balancer is only created when an ingress.yaml is deployed, not when the controller is deployed. Is there a way of forcing the load balancer to be created on deployment of the Controller, before any ingresses have been deployed?

I have several spring boot projects and an OAuth server deployed on my cluster - the spring boot projects' deployment require the OAuth2 server's URL. This requirement forces the deployment of the OAuth2 server separately, in order to configure/discover its hostname, before the other projects deploy. Ideally, I would like to deploy everything at once..

2 Answers
0

It looks like there is a custom attribute that can enable deletion protection:

https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.4/guide/ingress/annotations/#custom-attributes

answered 2 years ago
0

I ended up using external-dns to configure the Route 53 domain's hosted zone with a load balancer controller when the controller is deployed. This means that, in a brand new cluster with no previous ingress deployments, when the ingresses start to deploy, then the load balancer controller is created and external-dns configures the hosted zone. All the spring project's thrash around for a bit but eventually start using the domain and the load balancer successfully.

The only limitation to this approach is that it appears that both the load balancer controller and external-dns projects need to be deployed before the ingresses deploy. Including them as helm sub-charts along with other sub-charts that contain ingresses results in no ingresses being created..

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions