Question

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

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


Submit an answer


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!

Sign In or Sign Up to Answer

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.

KFSys
Site Moderator
Site Moderator badge
November 13, 2022

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.

Bobby Iliev
Site Moderator
Site Moderator badge
November 13, 2022

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.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel
Get started for free

Enter your email to get $200 in credit for your first 60 days with DigitalOcean.

New accounts only. By submitting your email you agree to our Privacy Policy.