By last61474
Hello!
I am trying to figure out a means to have a private communication between a pod in k8 cluster and an external droplet in the same data centre from same account.
I know i can expose a loadbalancer/nodeport service from the pod and get access but i want a private networking between these and totally avoid public access.
Any insights are appreciated.
Thanks!
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!
Hi there!
Unfortunately, DOKS NodePort services only bind to the nodes public interface at this time. One option to control access is to use and ingress controller such as nginx(https://github.com/kubernetes/ingress-nginx) , and then configure ingress rules using ingress objects(https://kubernetes.io/docs/concepts/services-networking/ingress/).
By using this you can setup a whitelist on the ingress controller and whitelist your external droplet’s IP: https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#whitelist-source-range
This would allow you to expose that service publicly but only allow one IP to actually contact your service.
Regards,
John Kwiatkoski Senior Developer Support Engineer
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.