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


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.

Site Moderator
Site Moderator badge
November 13, 2022

Hi @giantdarkcyanwhale,

Is that what you were looking for:

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.

As you are using Kubernetes, what you could do, is rather than using a Load balancer you could use a NodePort:

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