Alex
Alex

Reputation: 9

Access pod application by pod IP outside Cluster

First, I did some research on google. Also, I have checked this article: How to access pod IP from outside

But I still have a question.

My Setup:

I have 2 "environments": Dev and Staging.

Dev - I have 1 machine with K8S (Master, but I'm running my pods on it)

STG - 3 machines with k9s - cluster

Now I'm running my simple web app on a dev k8s machine. I see in the k8s dashboard my pod, with IP: 10.XX.XX.XX. If I RDP into the machine and open the browser - I can open my web app - everything works well. Nice!

Now, what I want is - to be able to open a browser on my Windows (HOST) machine, put in the URL IP of a pod from DEV (or STG) k8s and to see my web app.

In the article above I see that TA has installed OpenVPN and this solved his issue.

If I do it, can it help me? (I don`t want to use a proxy, port forward, etc.)

I'm a little bit confused because my VM's using switch and the VM is in the same network with My host, so I'm not sure if I need VPN.

If not - how I can access to pod app by pod Ip from My host?

Thanks

Updated:

Maybe something like Fabio + Consul, or Ocelot/Kong Gateway can help me with this issue?

Upvotes: 0

Views: 88

Answers (1)

dishant makwana
dishant makwana

Reputation: 1079

Create a Nodeport or Loadbalancer service for your pod and access your pod from the host machine by "VM ip:port".

Upvotes: 1

Related Questions