How should I automatically associate a Kubernetes-provisioned elastic load balancer with a Route 53 alias? How should I automatically associate a Kubernetes-provisioned elastic load balancer with a Route 53 alias? kubernetes kubernetes

How should I automatically associate a Kubernetes-provisioned elastic load balancer with a Route 53 alias?


There is a project that accomplishes this: https://github.com/wearemolecule/route53-kubernetes

A side note here, there are some issues with being able to select the TLD that this uses, it seems to use the first matching public recordset.

Also this doesn't work with the internal ELBs. There was an issue opened under the project for this request.


K8s cannot automatically associate the ELB with the route 53. You need config that by yourself. As on how to instruct k8s to reuse an existing ELB, there are two ways:

  1. [Update: this only works on GCE, NOT on AWS] Specify the service type=LoadBalancer, and specify the ExternalIP to equal the existing ELB's external IP, and k8s should reuse that ELB. I know this works on GCE, but I haven't tried it on AWS. Also, if this all works, when you delete the k8s service, the ELB will be deleted by k8s as well.

  2. Specify the service as of type=NodePort, and specify its NodePort to equal the backend port of your existing ELB. I have more confidence in this approach. Also, with this approach, when the service is deleted, the ELB will not be delete by k8s.