Home > Software engineering >  What I need to provide to make calls from my k8s cluster?
What I need to provide to make calls from my k8s cluster?

Time:09-30

I have a Kubernetes Cluster with my application running inside of it, also I have a host machine, that my application need to access.

All the infrastructure is located inside the VPN network

How can I setup egress to let my application send requests from the cluster to this host machine (does the Kubernetes Network Policies is an appropriate way to handle this stuff and actually solving this problem?)

(Sorry, if this is too obvious question, haven't found any solutions for that yet, that works)

CodePudding user response:

I'm not sure if I get your question right, but by default no network connectivity is blocked by Kubernetes. I assume you haven't set up any NetworkPolicies, this means all Ingress & Egress communication is open and nothing will block access, at least from K8s perspective.

However, if you have only deployed your application but haven't exposed it yet (with Ingress or Service: LoadBalancer) you will not be able to reach your application from outside the cluster. If you're running on-prem you will need to install MetalLB or some sort of service that allows you to create Services of Type LoadBalancer. The same goes for Ingress however, as the Ingress Controller will need some sort of access in the first place.

  • Related