title: How to setup Ingress for AWS EKS Application Load Balancer(ALB) for multiple microservices?
body: <p>I have 5 microservices which I wish to allow external traffic to. These microservices will be hosted on different subdomains. I am using K8s cluster on EKS and have the cluster and other services running.
  There seems to be quite a lot of confusion when it comes to Ingress. I have configured the ALB ingress controller by following this tutorial on <a href="https://www.eksworkshop.com/beginner/130_exposing-service/ingress_controller_alb/" rel="nofollow noreferrer">eksworkshop</a>. This worked for me and I am able to deploy the 2048 game as the tutorial explains.</p>
  <p>Now what I wish to develop is an Ingress resource as following:</p>
  <pre><code># apiVersion: networking.k8s.io/v1beta1
  apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
      name: cluster-ingress
      annotations:
          kubernetes.io/ingress.class: alb
          alb.ingress.kubernetes.io/scheme: internet-facing
          alb.ingress.kubernetes.io/target-type: ip
  spec:
      rules:
          - host: app.my-domain.com
            http:
                paths:
                    - path: /*
                      backend:
                          serviceName: app-cluster-ip-service
                          servicePort: 3000
  
          - host: ms1.my-domain.com
            http:
                paths:
                    - path: /*
                      backend:
                          serviceName: ms1-cluster-ip-service
                          servicePort: 8000
          - host: ms2.my-domain.com
            http:
                paths:
                    - path: /*
                      backend:
                          serviceName: ms2-cluster-ip-service
                          servicePort: 2000
          - host: ms3.my-domain.com
            http:
                paths:
                    - path: /*
                      backend:
                          serviceName: ms3-cluster-ip-service
                          servicePort: 4000
          - host: website.my-domain.com
            http:
                paths:
                    - path: /*
                      backend:
                          serviceName: website-cluster-ip-service
                          servicePort: 3333
  </code></pre>
  <h1><strong>So here are my doubts</strong></h1>
  <ol>
  <li>How do I configure ingress to redirect to different ports based on the domain? (when I was using Nginx, there is a provision to set Upstream and then Nginx routes traffic accordingly)</li>
  <li>What is the procedure to link it to my registered domain? (TLS certificates with Cert manager Lets Encrypt)</li>
  <li>What should I put in my DNS records for all the subdomains? (A records/CNAME of ALB) And do all the 5 subdomains have the same record/config?</li>
  </ol>
  <p>I use Cloudflare for DNS management if that helps.</p>