0

I hosted a kubernetes cluster on EC2 instances (Self managed cluster and not EKS). I want to expose a service with type Load balancer. But I see that External-IP of the service is pending. However pod is running and I can even access it with POD ip.

I tried multiple annotations but none worked:

service.beta.kubernetes.io/aws-load-balancer-internal: "true"

service.beta.kubernetes.io/aws-load-balancer: "true"

I thought IAM permissions for the EC2 was missing but that didnt work either. Can anyone help?

  • 1
    Have you installed a load-balancer controller? or ingress-controller? – Jonas Sep 25 '21 at 20:59
  • No Jonas, i didn't install anything. My understanding is that an ALB would get created when I set service type as "LoadBalancer". I know an other way would be Ingress controller but I am a newbie trying to learn kubernetes and I wanted to try this Load balancer option. Can you tell me what is this "load-balancer controller". And it is really possible to have aws load balancer setup with managed cluster on EC2 rather than EKS? – nischeruku Sep 26 '21 at 08:04
  • https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.2/ – Jonas Sep 26 '21 at 08:06
  • You're still able to assign the svc an external IP. As long as the ip of the EC2 instance has a public IP adress. – Manuel Sep 26 '21 at 09:11
  • if you setup a cluster on EC2 instances, there is nothing listening to those annotations. There will be no ALB coming out of the box, as far as i understand. This logic has to be implemented by yourself. Probably you would like to take a look at https://metallb.org/ or something similar. – Manuel Sep 26 '21 at 09:20

0 Answers0