By feluxe
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!
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.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.