- Newest
- Most votes
- Most comments
Hello,
By default, when we create a Service of type "loadBalancer", it creates Classic Load Balancer as it makes use of the kubernetes in-tree controller. The "LoadBalancer" type Service Exposes the Service externally using an external load balancer. So as our Kubernetes cluster is part of AWS EKS, it creates Classic Load Balancer by default and we cannot modify this behaviour.
However when you have AWS load balancer controller and you create Service of type "loadBalancer" with required annotations[1], you have provision of creating Application Load Balancer or Network Load Balancers as well.
To avoid Load Balancers from getting created, you need to create service of type "Cluster IP" or "NodePort". In "Cluster IP" Service, services can have a cluster-scoped virtual IP address. Clients can connect using that virtual IP address, and Kubernetes then load-balances traffic to that Service across the different backing Pods.
"NodePort" Service exposes the Service on each Node's IP at a static port (the NodePort). To make the node port available, Kubernetes sets up a cluster IP address, the same as if you had requested a Service of type: ClusterIP.
[1] https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.2/guide/service/annotations/
We have used another role for the cluster (not the AmazonEKSClusterPolicy), which is not giving it permissions to perform the actions that we don't want.
Thanks for your support!
Relevant content
- asked 3 years ago
- asked 9 months ago
- How can I troubleshoot issues when I use the AWS Load Balancer Controller to create a load balancer?AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 7 months ago