Report this

What is the reason for this report?

How to create a load balancer that will have no external IP

Posted on November 12, 2022

Hey,

I am trying to create a load balancer that will only be accessible from other droplets in the same vpc.

I do not want anyone else to have access. Is that possible with DO?

This is my current code:

apiVersion: v1 kind: Service metadata: name: backend spec: type: LoadBalancer ports: - name: http protocol: TCP port: 80 targetPort: 8001 selector: app: backent

But it always has a public IP created



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.

Hey @giantdarkcyanwhale,

I believe that this is not possible with the managed load balancers.

The best thing to do to get your voice heard regarding this would be to head over to our Product Ideas board and post a new idea, including as much information as possible for what you’d like to see implemented.

https://ideas.digitalocean.com/

As you are using Kubernetes, what you could do, is rather than using a Load balancer you could use a NodePort: https://www.digitalocean.com/docs/kubernetes/resources/managed/#worker-node-firewalls

The above documentation explains how to create a new cloud firewall, attach it to your DOKS cluster and how to alter the default allow all ipv4+ipv6 traffic-rule that is automatically created when defining a NodePort.

Hope that helps!

- Bobby.

Hi @giantdarkcyanwhale,

Is that what you were looking for:

https://docs.digitalocean.com/tutorials/internal-lb/

Give the article a read and see if it does indeed help you.

Hey there!

Quick update for everyone:

DigitalOcean now offers Internal Load Balancer (ILB), which is designed for securely and efficiently routing internal traffic within your private network. It’s a great way to distribute traffic across Droplets or Kubernetes (DOKS) clusters using private IPs, keeping your workloads safe from the public internet.

Key benefits of the ILB:

  • Simplified Management – Create and scale ILBs with just a few clicks.
  • Private Load Balancing – Distribute traffic internally with private IPs.
  • VPC Peering Support – Enable secure communication across VPCs.
  • DOKS Connectivity – Keep Kubernetes service traffic internal.

This is a good fit for microservices, internal apps, and backend services that need high availability and security.

Check out the full blog post for more details: DigitalOcean Internal Load Balancer is Now GA

- Bobby

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.