Understanding EKS ALB Controller

10/14/2021

I dont know from where should I start for understanding ALB controller better.

1) My aim is to create a single ALB for multiple services. For the same, firstly, created two services with nodeport. One service gives us game 2048 and other service gives nginx. I can access both URL's from node port. Now I deployed ingress rules as below:

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  namespace: kube-system
  name: nginxstandalonetesting
  annotations:
    kubernetes.io/ingress.class: alb
    alb.ingress.kubernetes.io/scheme: internet-facing
    alb.ingress.kubernetes.io/target-type: ip
spec:
  rules:
    - http:
        paths:
          - path: /dev
            backend:
              serviceName: game2048
              servicePort: 80
	        - path: /test
            backend:
              serviceName: nginx
              servicePort: 80

Post this I see that ALB is created with single listner at port 80 with 2 target groups. Now when I browse alb URL I just see the game 2048 is displayed. And when I try http://albdns/test, I get an error. May I know what else should I be doing.

2) Now if I wanted to add a new ingress rule for 3rd service, how should I write ingress rule. Can you provide me an complete example. Using kubernetes.io/ingress.class: "alb" annotation is overwriting the earlier ingress rules.

3) Is it possible to create an ekscluster (in a new VPC) with node group occupying only a smaller subnet.

4) Is it possible to share Ingress rules from different namespace with a single ALB controller. I followed alb.ingress.kubernetes.io/group.name annotation but it didn't work.

-- nischeruku
amazon-eks
amazon-web-services
kubernetes

0 Answers