thatguyjono
thatguyjono

Reputation: 525

How to point my domain to my EKS cluster?

I have followed the AWS getting started guide to provision an EKS cluster (3 public subnets and 3 private subnets). After creating it, I get the following API server endpoint https://XXXXXXXXXXXXXXXXXXXX.gr7.us-east-2.eks.amazonaws.com (replaced the URL with X's for privacy reasons).

Accessing the URL in the browser I get the expected output from the cluster endpoint.

Question: How do I point my registered domain in Route 53 to my cluster endpoint?

I can't use a cname record because my domain is a root domain and will receive an apex domain error.

I don' have access to a static ip, and I don't believe my EKS cluster has a public IP address I can directly used. This would mean I can't use an A record (as I need an IP address).

Can I please get help/instructions as to how I can point my domain straight to my cluster?

Below is my AWS VPC architecture:

enter image description here

Upvotes: 4

Views: 7434

Answers (1)

Dale C. Anderson
Dale C. Anderson

Reputation: 2460

Don't try and assign a pretty name to the API endpoint. Your cluster endpoint is the address that's used to talk to the control plane. When you configure your kubectl tool, the api endpoint is what kubectl talks to.

Once you've got an application running on your EKS cluster, and have a load balancer, or Ingress, or something for incoming connections, that's when you worry about creating pretty names.

And yes, If you're dealing with AWS load balancers, you don't get the option of A records, so you can't use the apex of the domain, unless you're hosting DNS in route 53, in which case, you can use "alias" records to point the apex of a domain at a load balancer.

Kubernetes is a massively complex thing to try understand and get running. Given that this is the type of question you're asking, it sounds like you don't have the full picture yet. I recommend (1) joining the Kubenetes slack channel. It'll be a much faster way to get help than SO, and (2) take in Jeff Geerling's excellent Kubernetes 101 course on youtube.

Upvotes: 9

Related Questions