- Newest
- Most votes
- Most comments
Hello,
When you create a LoadBalancer
type service in EKS, the AWS Load Balancer Controller automatically creates an NLB and populates the NLB's DNS Name into the LoadBalancer Ingress property by default.
By default, the loadBalancerClass
property of the Service manifest is set to service.k8s.aws/nlb
. If you do not desire to use an NLB with your LoadBalancer type service, explicitly set this property value to a different value as shown below.
apiVersion: v1
kind: Service
metadata:
name: ubuntu-tcp
namespace: ubuntu
labels:
app: ubuntu
spec:
type: LoadBalancer
selector:
app: ubuntu
externalIPs:
- 5.5.5.5
loadBalancerClass: <replace-with-random-string>
ports:
- port: 20000
name: tcp
protocol: TCP
targetPort: 20000
This above manifest will not trigger an NLB creation as the loadBalancerClass
is not service.k8s.aws/nlb
.
Note: Cilium CNI might have a specific requirement for the
loadBalancerClass
value. Please go through Cilium documentation to figure out its requirements.
I hope this is helpful to you. Please leave a comment if you have any additional questions and I'll be happy to assist you!
Relevant content
- Accepted Answerasked 2 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 a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 years ago