What would you like to be added:
I would like to add a optional --browser flag to the port-forward command to allow the CLI to automatically open the browser and point to a particular path with the correct hostname and port. So, kubectl port-forward pod-0 :9090 --browser /admin would open the port-forward and, if successful, then automatically open the user's default browser to http://localhost:<whatever-automatic-port-is-chosen>/admin. The user could also specify protocol overrides (https vs http) if necessary.
We can use github.com/pkg/browser to deal with all the cross-platform browser issues as that package is well-used.
Why is this needed:
This will streamline the process of accessing that URL particularly when asking the operating system to pick a random open port so you no longer need to copy/paste from a terminal into a browser.
**Please note I've already implemented this in a local branch and would be happy to contribute it, but wanted to start with an issue first if there were any things about the design that warranted discussion.
What would you like to be added:
I would like to add a optional
--browserflag to theport-forwardcommand to allow the CLI to automatically open the browser and point to a particular path with the correct hostname and port. So,kubectl port-forward pod-0 :9090 --browser /adminwould open the port-forward and, if successful, then automatically open the user's default browser tohttp://localhost:<whatever-automatic-port-is-chosen>/admin. The user could also specify protocol overrides (https vs http) if necessary.We can use
github.com/pkg/browserto deal with all the cross-platform browser issues as that package is well-used.Why is this needed:
This will streamline the process of accessing that URL particularly when asking the operating system to pick a random open port so you no longer need to copy/paste from a terminal into a browser.
**Please note I've already implemented this in a local branch and would be happy to contribute it, but wanted to start with an issue first if there were any things about the design that warranted discussion.