0

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 ?

floormind
  • 1,868
  • 5
  • 31
  • 85

1 Answers1

1

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

gohm'c
  • 13,492
  • 1
  • 9
  • 16
  • Thank you, this gets the services running, rather than pending state. Is there a way to see a public IP4 address instead of the long aws dns name. i'm interested in the ipv4 because thats the only way i can create a A record in Godaddy – floormind Aug 20 '22 at 02:18
  • What's the problem of using CNAME in the Godaddy? – Adiii Aug 20 '22 at 02:31
  • @eagercoder, you can try CNAME on Godaddy [here](https://my.godaddy.com/help/add-a-cname-record-19236). If not you can perform a `nslookup ` to get the public IP. – gohm'c Aug 20 '22 at 02:42
  • you can automatically update using https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/godaddy.md – kholisrag Aug 23 '22 at 18:47