To stop port forwarding in Kubernetes, you can simply terminate the kubectl port-forward command that you started in your terminal. This can be done by:
-
Using Ctrl + C: If you are running the command in a terminal, you can press
Ctrl + Cto interrupt and stop the port forwarding process. -
Closing the Terminal: If you close the terminal window where the command is running, it will also stop the port forwarding.
Once the command is stopped, the port forwarding connection will be terminated, and you will no longer be able to access the application through the forwarded port.
