On Premise - Kubernetes External Endpoint for services

9/1/2017

We are analyzing the integration of the Kubernetes service in our on premise environment. We have SaaS based services which can be exposed publicly.

We have doubts in setting up the external endpoints for the services. Is there any way to create the external endpoints for the services?

We have tried to setup the ExternalIP parameter in the services with the master node IP address. Not sure this is the correct way. Once we setup the external IP with the master node IP address we are able to access the services.

We have also tried with ingress controllers and also there we can access our services with the IP address of the node where the ingress controllers are running.

For Example :

Public IP : XXX.XX.XX.XX

Ideally, we would map the public IP with the load balancer virtual IP, but we cannot find such a setting in Kubernetes.

Is there any way to address this issue?

-- StackOverFlow
docker
kubernetes

1 Answer

9/1/2017

My suggestion is to use an Ingress Controller that acts as a proxy for all your services in kubernetes.

Of course your ingress controller has to be somehow exposed to the outside world. My suggestion is to use the hostNetwork setting for the ingress controller pod (this way, the pod will be listening on your host's physical interface, like any other "traditional" service).

A few resources:

  • Here details on how a pod can be reached from outside your k8s cluster).
  • Here a nice tutorial on how to setup an ingress controller on k8s.

If you have more than one minion in your cluster, you'll end up having problems with load balancing them. This question can be helpful about that.

-- whites11
Source: StackOverflow