Automatically restart port-forwarding in Kubernetes or OpenShift
When you set up a port-forward to a Kubernetes or OpenShift pod, the connection will disconnect automatically with the message “lost connection to pod” when the pod completes or you reach the port-forward time limit. It could be a few minutes or a few hours. The automatic disconnection is a useful feature for security and to save resources, but the closed connection will interrupt your flow of thought and force you to restart port forwarding....