rancher-sandbox / rancher-desktop

Container Management and Kubernetes on the Desktop
https://rancherdesktop.io
Apache License 2.0
5.82k stars 272 forks source link

Persist Port Forwarding configuration between Rancher Desktop restarts #3563

Open andrii-litvinov opened 1 year ago

andrii-litvinov commented 1 year ago

Problem Description

When I quit Rancher Desktop and then start it again, I have to configure port forwarding again for my services.

Proposed Solution

It would be good to have the port forwarding configuration persisted between the restarts.

Additional Information

No response

Nino-K commented 1 year ago

@andrii-litvinov thanks for reporting this, however, we would need some additional details. Which platform are you using (windows, mac or Linux)?

What backend are these services associated with (Moby, Containerd, or K8s)?

Currently on Moby and containerd if you run your service with published ports along with --restart=always flag you will see them coming back up after restarting Rancher Desktop.

andrii-litvinov commented 1 year ago

@Nino-K thanks for a prompt response! My bad, I should've provided more details from start, just haven't thought of it. I use Rancher Desktop on macOS Ventura for K3s cluster with containerd container engine.

I setup Port Forwarding for a K8s Service resource listed in Rancher Desktop settings. And such Port Forwarding doesn't persist after Rancher Desktops is restarted.

andrii-litvinov commented 1 year ago

Is there any update on the issue? Or maybe there's a workaround available that would help to mitigate it until resolved? Is it possible to hook into Rancher startup with some script to expose required ports for the services?

jslester14 commented 1 year ago

We are currently experiencing this exact same issue. We're using Rancher Desktop v1.8.1 on Windows 10 for the K3s cluster with moby container engine. If you found a way to script this or configure it, it would greatly help us.

andrii-litvinov commented 1 year ago

I figured how to satisfy my needs with pure Docker without K8s, so I switched to it. I am also considering to give Docker for Mac a go.

Nino-K commented 1 year ago

@jslester14 if you see this on windows it could be related to this issue which is already fixed and will be part of our next release. Port forwarding on windows and mac are two different underlying mechanisms.

lizfrench-esgglobal commented 1 year ago

Hi, I also have the same requirement. We are running the latest version of Rancher and the ability to persist port forwarding between reboots would really help the development process

therealcodeninja commented 11 months ago

This would be very helpful on Windows version as well. Forgetting to reapply the port forwardings after rebooting is going to drive me crazy!