Report this

What is the reason for this report?

Load Balancer not forwarding to kubernetes service on nodePort.

Posted on April 1, 2018

Hi there,

I run a kubernetes cluster on Digital Ocean.

I created a service, which is exposed via type nodePort. I can access the service in my browser if I enter http://PublicNodeIp:31433.

Now I want to use a DigitalOcean Load Balancer to forward traffic from port 80 to the service, but it doesn’t work. If I enter the load balancer IP in the browser I get: 503 Service Unavailable.

The load balancer is configured to forward http port 80 to Droplet http port 31433

I’m not sure, but can it be that the Load Balancer doesn’t forward to the Public Droplet Ip? If this is the problem, how can I expose a Kubernetes Service using the Private Droplet Ip?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

What you are describing should work normally via the public IP address, however, Load Balancers default to using the private network if private networking is enabled on the target Droplets. In this case, since you are using Kubernetes, I assume private networking is enabled.

I recommend that you expose the service on the private IP address instead and check back.

I have the same error

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.