How do i fix my Network Load Balancer pending state

663 views Asked by At

I have a classic AWS Elastic Load Balancer deployed into my kubernetes cluster, and i am able to get to my UI app through the load balancer. However I know thet Network Load Balancers are the way forward, and i think i should be using that because I think it can issue an External IP which I can then use in my Godaddy account to map to my domain name.

However when i apply the k8s manifest for the NLB, it just stays in a pending state.

This is my configuration here.

kind: Service
apiVersion: v1
metadata:
  name: <service name>
  annotations:
        service.beta.kubernetes.io/aws-load-balancer-type : external
        service.beta.kubernetes.io/aws-load-balancer-subnets : <a public subnet>
        service.beta.kubernetes.io/aws-load-balancer-nlb-target-type : ip
        service.beta.kubernetes.io/aws-load-balancer-scheme : internet-facing
spec:
  selector:
    app: <pod label>
  type: LoadBalancer
  ports:
  - protocol: TCP
    port: 85
    targetPort: 80

can anyonee help in fixing this ?

1

There are 1 answers

4
gohm'c On

Try update your annotation: service.beta.kubernetes.io/aws-load-balancer-type: "nlb"