简体   繁体   中英

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?

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM