Why is AWS ALB not talking to an ingress controller?



  • I'm taking TechnoWorld Kubernetes Administration class, where we learn to create a Kubernetes cluster from scratch using one Ubuntu EC2 for master node, and two Ubuntu EC2s for worker nodes. The course guides us into installing the different Kubernetes components - containerd, kubeadm, kubelet, kubectl, Weavnet etc. - on each pertinent EC2. We use NGINX as our simple application that are running on our worker node pods. I have the infrastructure set up where I can actually, for example, do a curl from my master node and get the "Welcome to nginx" greeting as a response. So far so good. I even created a Terraform script to set this up. I even setup test Kubernetes LoadBalancer service that's accessible to the outside world, put it's IP:port on the browser and see "Welcome to nginx" proving that the networking (VPC, subnet, security group) is correct.

    Here's the traffic flow of the fundamental infrastructure we're trying to build.

    Internet-facing AWS ALB(port 80) -> ingress controller LoadBalancer service(port 80:32111 mapping) -> ingress -> ClusterIP service -> EC2 worker with NGINX pod

    So a user puts an ALBs DNS name on the browser and gets the "Welcome to NGINX" greeting.

    However with my setup, when I put the ALB's DNS name, I get a "This site can't be reached" message.

    I set up my internet-facing ALB to serve port 80, forward to a target group on port 32111 (ingress controller port) that has the 2 EC2 worker nodes registered as targets.

    Any pointers on how I can debug this seemingly simple/fundamental setup?

    TIA



  • Assuming everything is running and working fine on AWS, the key pieces of information you mentioned above are the DNS record and the Ingress.

    I would assume you have defined the https://kubernetes.io/docs/concepts/services-networking/ingress/#name-based-virtual-hosting .

    Then you'd also need to add, in AWS Route53, the appropriate DNS records to point the the ALB.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2