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.

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 @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.