GoogleContainerTools / skaffold

Easy and Repeatable Kubernetes Development
https://skaffold.dev/
Apache License 2.0
15.08k stars 1.63k forks source link

Service port-forwards torn down between redeploys even though service is unchanged #4518

Open briandealwis opened 4 years ago

briandealwis commented 4 years ago

On a redeploy during dev, the port-forwards for a service are torn down even though they are unchanged. As a result, refreshing a browser after making a change can lead to a page load failure.port

briandealwis commented 4 years ago

I haven't tracked down where it happens, but it seems this behaviour is necessary as kubectl port-forward service/xxx just points to the first pod. https://github.com/kubernetes/kubernetes/issues/15180#issuecomment-457314694 notes:

the port forward is not re-evaluated when the pod dies. so, do a rolling upgrade and the port forward breaks.