kubefwd icon indicating copy to clipboard operation
kubefwd copied to clipboard

Kubefwd is not properly reconnecting when new pod is created

Open imdbere opened this issue 1 year ago • 5 comments

Hi, first of all thanks for making this project available :)

One thing that makes kubefwd harder to use is that it doesn't properly reconnect if e.g. a deployment is updated and therefore an old pod is terminated and a new one is created. The error that is created looks like this:

ERRO[17:36:11] Runtime: an error occurred forwarding 80 -> 80: error forwarding port 80 to pod 1b4e23d5467af287d3685ede5f693f04b5a909d475cb31d470381f6c3c956ffe, uid : failed to find sandbox "1b4e23d5467af287d3685ede5f693f04b5a909d475cb31d470381f6c3c956ffe" in store: not found

After that, only restarting the command makes the port-forwarding work again. Is this intended behaviour ? It would be ideal if kubefwd would properly shift traffic to the new pod like it is done by kubernetes services or at least doing some reconnecting.

This is the command used: sudo kubefwd svc -n default -d some-name -x some-kubeconfig

Thanks!

imdbere avatar Oct 04 '22 15:10 imdbere