Search code examples
kuberneteskubernetes-helmtraefikamazon-elbtraefik-ingress

Traefik and existing AWS Classic Load Balancer


I have a working k8s cluster on EC2 with a classic load balancer (Port 443). Now I am trying to set up Traefik in my cluster, for which I am using the official helm chart. But I can't find a way to use my existing load balancer and prevent Traefik from creating its own load balancer.

How can I get Traefik to use the existing load balancer?


Solution

  • Maybe you can change the service type to NodePort instead of the Loadbalancer

    expose nodeport on trefik service accordingly

    ports:
        - name: http
          port: 80
          protocol: TCP
          targetPort: http
          nodePort: 30080
        - name: https
          port: 443
          protocol: TCP
          targetPort: https
          nodePort: 30081
    

    Read more at : https://medium.com/@jainishshah17/use-pre-created-existing-loadbalancer-to-expose-your-kubernetes-service-407fb65cb416