https://rancher.com/ logo
Title
m

most-agency-99776

03/29/2023, 5:37 PM
When I quit Rancher Desktop and then start it again, I have to configure port forwarding again for my services. We're using Rancher Desktop v1.8.1 on Windows 10 for the K3s cluster with
moby
container engine. Does anyone know how to get this to persist? If you found a way to script this or configure it, it would greatly help us.
f

fast-garage-66093

03/29/2023, 5:44 PM
You should create a nodeport or loadbalancer service to automatically forward the port to the host. The "Port Forwarding" page just allows you to forward cluster-internal services that normally are not reachable. These forwards are ephemeral, and their setup cannot yet be automated with
rdctl
.
m

most-agency-99776

03/29/2023, 5:45 PM
Yes we tried that, but the LoadBalancer continually fails to either publish the port or if the pod is recreated, it doesn't update and becomes unreachable.
When you say "cannot _yet_", do you know if there is a plan to make that configurable with
rdctl
?
f

fast-garage-66093

03/29/2023, 5:49 PM
Yes, we need to be able to do this for automated testing: Port Forwarding functionality is not available via the API · Issue #4171
Still, the right solution for persistent port forwarding is to use a nodeport or loadbalancer service
👍 1
If you have a repro case for the loadbalancer problem, could you file a Github issue please?