title: EKS Ingress with Single ALB, multiple namespaces, and External DNS
body: <p>I'm trying to configure a single ALB across multiple namespaces in aws EKS, each namespace has its own  ingress resource.</p>
  <p>I'm trying to configure the ingress controller <code>aws-loadbalancer-controller</code> on a k8s v1.20.</p>
  <p>The problem i'm facing is that each time I try to deploy a new service it always spin-up a new classic loadbalancer in addition to the shared ALB specified in the ingress config.</p>
  <p><a href="https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.2/" rel="nofollow noreferrer">https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.2/</a></p>
  <p><a href="https://i.stack.imgur.com/eylHl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eylHl.png" alt="archi" /></a></p>
  <pre class="lang-yaml prettyprint-override"><code># service-realm1-dev.yaml:
  apiVersion: v1
  kind: Service
  metadata:
    name: sentinel
    annotations:
      external-dns.alpha.kubernetes.io/hostname: realm1.dev.sentinel.mysite.io
    namespace: realm1-dev
    labels:
      run: sentinel
  spec:
    ports:
      - port: 5001
        name: ps1
        protocol: TCP
    selector:
      app: sentinel
    type: LoadBalancer
  </code></pre>
  <pre class="lang-yaml prettyprint-override"><code># ingress realm1-app
  apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
    annotations:
      kubernetes.io/ingress.class: alb
      alb.ingress.kubernetes.io/group.name: sentinel-ingress
      alb.ingress.kubernetes.io/scheme: internet-facing
      alb.ingress.kubernetes.io/target-type: ip
      alb.ingress.kubernetes.io/healthcheck-protocol: HTTP
      alb.ingress.kubernetes.io/healthcheck-port: traffic-port
      alb.ingress.kubernetes.io/healthcheck-interval-seconds: &quot;15&quot;
      alb.ingress.kubernetes.io/healthcheck-timeout-seconds: &quot;5&quot;
      alb.ingress.kubernetes.io/success-codes: 200-300
      alb.ingress.kubernetes.io/healthy-threshold-count: &quot;2&quot;
      alb.ingress.kubernetes.io/unhealthy-threshold-count: &quot;2&quot;
      alb.ingress.kubernetes.io/listen-ports: '[{&quot;HTTP&quot;:80}]'
    name: sentinel-ingress-controller
    namespace: realm1-dev
  spec:
    rules:
      - host: realm1.dev.sentinel.mysite.io
        http:
          paths:
            - path: /
              pathType: Prefix
              backend:
                servicePort: use-annotation
                serviceName: sentinel
  
  </code></pre>
  <p>Also I'm using external dns to create a route53 reecodset, and then I use the same configured DNS to route requests to the specific eks service, is there any issue with this approach ?</p>