Kubernetes port forwarding: cleaning up orphaned ports
Introduction When working with Kubernetes there may be cases where you may need to use port forwarding to get access to an application running inside the cluster. Some of the use cases may be: accessing information in internal applications that are not meant to be exposed for public access verifying that the application works as expected prior to exposing it for public access troubleshooting purposes Port forwarding is a functionality that is available in Kubernetes via kubectl port-forward command. This command creates a direct connection between the caller (typically a client machine) and the Pod where the application is running inside the cluster. You can either target a specific Pod or any Pod fronted by Kubernetes resources like Service or Deployment. You can read more about the command in official documentation: port-forward. ...