Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HAProxy ingress controller is creating ELBs, which are deprecated in AWS and will be removed after August 2022 #920

Open
dbarvitsky opened this issue May 4, 2022 · 2 comments

Comments

@dbarvitsky
Copy link

Description of the problem

I was looking into a way of controlling request affinity in Kubernetes and followed the instructions in the docs. Our Kubernetes clusters are running in AWS, specifically EKS. I noticed that running in LoadBalancer mode creates an AWS load balancer of the ELB type, which is deprecated per AWS and will no longer be able to run after August 2022. I looked through help and configuration options and didn't find an apparent way to force HAProxy to use NLBs or ALBs instead.

As a workaround, it is possible to use node ports, but that doesn't work for general case in microservice environment (requires coordination between teams and port assignments).

Expected behavior

NLB or ALB load balancer should be created when running in the LoadBalancer mode.

Steps to reproduce the problem

  1. Create a VPC with EKS cluster
  2. Follow the demo instructions
  3. Observe: the type of the load balancer created in AWS is ELB.

Environment information

HAProxy Ingress version: v0.13.6

@dbarvitsky
Copy link
Author

Found a way to do it with NLB (inspired by #713).

I ended up adding annotations to the ingress service:

# haproxy-ingress-values.yaml
controller:
  hostNetwork: true
  ...
  service:
    type: LoadBalancer
    annotations:
      service.beta.kubernetes.io/aws-load-balancer-type: nlb
      # This is irrelevant, but might be useful too.
      service.beta.kubernetes.io/aws-load-balancer-internal: "true"

And then install as usual:

$> helm3 install --namespace whatever  haproxy-ingress haproxy-ingress/haproxy-ingress --version 0.13.6 -f haproxy-ingress-values.yaml

Relevant documentation is available in sigs. Admittedly, this can be considered common knowledge and hence lack of my expertise trying to setting up HAProxy ingress. I think a noob like me could benefit from a note in getting started to tripping over it.

@eifelmicha
Copy link

@dbarvitsky According to the article this is only relevant for Class Load Balancer not running inside a VPC. Notice also the checkbox at the top of the page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants