Replies: 1 comment
-
I'm not sure if I understand you question correctly, but couldn't you use the "Port Forwarding" tab to forward the cluster port to a localhost port, and then access it from there? You may not be able to select the host port right now, but have to accept a randomly assigned free port. We have used this to e.g. connect to a cluster-internal MySQL database with a GUI database explorer running on the host. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I know kubernetes is a closed network and you can expose with LoadBalancer or NodeIP service types. Let us leave it there 😃
The idea is to expose internal network of kubernetes on host machine. This means I will be able to do dns lookups on internal names like
myservice.mynamespace.svc.cluster.local
. The reason I want to do this is because I want to debug one of two workloads which does not expose themselves outside the cluster. I use the internal dns name to connect. So when I debug one of the applications on my host machine while running the other application in kubernetes as I do not need to put that in debug mode.My current setup:
Windows 10 with WSL
Rancher Desktop
My current solution:
I use VPN client to connect into a workload inside kubernetes which exposes all the network inside kubernetes. I have some drawbacks on this solution. First all dns lookups goes through the VPN connection, into kubernetes which cannot resolve other than internal dns names and forward it back to WSL which forward it back to the host machine, guess what, it goes back through VPN and deadlock. This means I cannot pull docker images as dns names cannot be resolved. Second, previously I changed
/etc/resolv.conf
to usenameserver 8.8.8.8
which led to that the dns lookup went to WSL after kubernetes fallback and everything is fine, but in Rancher Desktop version 1.1.0+ that is not possible as every time I restart Rancher Desktop/etc/resolv.conf
is reset. I think this is done bydns-masq
solution.If anyone has a good idea of how to manage this part, I would be very happy.
Beta Was this translation helpful? Give feedback.
All reactions