Which URL/IP to use, when accessing Kubernetes Nodes on Rancher?

4/14/2019

I am trying to expose services to the world outside the rancher clusters.

Api1.mydomain.com, api2.mydomain.com, and so on should be accessible.

Inside rancher we have several clusters. I try to use one cluster specifically. It's spanning 3 nodes node1cluster1, node2cluster1 and node2cluster1.

I have added ingress inside the rancher cluster, to forward service requests for api1.mydomain.com to a specific workload.

On our DNS I entered the api1.mydomain.com to be forwarded, but it didn't work yet.

Which IP URL should I use to enter in the DNS? Should it be rancher.mydomain.com, where the web gui of rancher runs? Should it be a single node of the cluster that had the ingress (Node1cluster1)?

Both these options seem not ideal. What is the correct way to do this?

I am looking for a solution that exposes a full url to the outside world. (Exposing ports is not an option as the companies dns cant forward to them.)

-- SwissCoder
docker-ingress
kubernetes-ingress
nginx-ingress
rancher

1 Answer

4/15/2019

Simple answer based on the inputs provided: Create a DNS entry with the IP address of Node1cluster1.

I am not sure how you had installed the ingress controller, but by default, it's deployed as "DaemonSet". So you can either use any one of the IP addresses of the cluster nodes or all the IP addresses of the cluster nodes. (Don't expect DNS to load balance though).

The other option is to have a load balancer in front with all the node IP addresses configured to actually distribute the traffic.

Another strategy that I have seen is to have a handful of nodes dedicated to run Ingress by use of taints/tolerations and not use them for scheduling regular workloads.

-- leodotcloud
Source: StackOverflow