13
votes

Is it possible to use the Ingress Controller function in Kubernetes without a load balancer (in Digital Ocean).

Is there any other mechanism to allow a domain name to map to a Kubernetes service; for instance if I host two WordPress sites on a Kubernetes cluster:

==> WP Site 1: Node Port 80 ==> WP Site 2: Node Port 8080

How does a domain name map to the container port 8080 without explicitly entering the port number.

Any help is appreciated.

1

1 Answers

5
votes

DNS doesn't support adding port numbers, you need an ingress controller (which essentially acts like a reverse proxy) to do this.

If you install the digital ocean cloud controller manager you'll be able to provision loadbalancers using services with type LoadBalancer. You can then deploy a standard ingress controller, like the nginx ingress controller and give the service type=LoadBalancer.

This then becomes the ingress into your cluster, and you only have a single LoadBalancer, which keeps costs down.