Load balancer in eks cluster kubernetes

Hi team ,
I am trying to create a loadbalacer in aws eks cluster in kodekloud aws playground
this is my configuration file

kind: Service
apiVersion: v1
metadata:
name: nginx-lb
spec:
type: LoadBalancer
selector: # labels are used as selectors
project: expense
component: backend
environment: dev
version: “1.0.0”
demo: lb
ports:

  • protocol: TCP
    port: 80 # service port
    targetPort: 80
    nodePort: 30007

kind: Pod
apiVersion: v1
metadata:
name: backend-lb
labels:
project: expense
component: backend
environment: dev
version: “1.0.0”
demo: lb
spec:
containers:

  • name: nginx
    image: nginx

After executing this, I could see the classic load balancer is being created without target instances in the console, later after some time its being deleted automatically . I tried a couple of times same issue. I just want to know if there is any problem with my configuration file, or if it’s a limitation in AWS Playground provided by kodekloud

Hi @saivardhanguduru

I don’t think AWS Playground supports service load balancers. Please try using NodePort instead.