Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Forwarding traffic from a DigitalOcean Load Balancer to a Kubernetes Service not working

I created a kubernetes service that is exposed via type: nodePort. I can access the service in my browser if I enter http://PublicDropletIp:31433.

Now I want to use a DigitalOcean Load Balancer to forward traffic from port 80 to the service. So I set a rule for the Load Balancer to forward http/80 to Droplet http/31433.

Unforutnatly this doesn't work. If I enter the load balancer IP in the browser I get: 503 Service Unavailable.

Does anyone know how I can expose the service so that the Load Balancer can forward traffic to it?

like image 890
Rotareti Avatar asked Sep 05 '25 03:09

Rotareti


1 Answers

I had this same issue and ended up on this thread. If anyone else is looking, I resolved it by configuring the firewall on my server.

To answer the question above, the firewall should be configured to accept tcp connections from the load balancer's ip on port 31433.

like image 73
Erich Schudt Avatar answered Sep 07 '25 21:09

Erich Schudt