minikube: minikube service opens in browser when it should not

The exact command to reproduce the issue:

minikube service --namespace mynamespace --url mynodeportservice

The full output of the command that failed:

In versions of minikube through 1.3.1, this output the service URL to stdout, and did not open the URL in the default browser. In 1.5.1, it outputs the URL and the “🎉 Opening kubernetes service …” message to stdout, and it opens in the default browser.

With --url=false, it does not open in the browser, but now it outputs an ascii-art table instead of the plain URL. With --url=true, it behaves the same as with --url.

Based on finding #5699, I tried using --format=“{{ .IP }}”. That leads to even greater insanity… it emits the message about opening the service in the default browser, but then fails to do so because it tries to open a file in the current directory matching the IP address, and errors out.

Please restore the older behavior so scripts can get the URL for a service, and fix --format to not try to open the resulting string in the default browser.

The output of the minikube logs command:

The operating system version: Mojave minikube 1.5.1 installed via homebrew

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (8 by maintainers)

Most upvoted comments

Good point. Will add newline back.

On Wed, Oct 30, 2019, 12:13 PM retracile notifications@github.com wrote:

*NIX commands generally include the newline at the end; otherwise you wind up with your shell prompt tacked on the end of the output (when using it interactively). When using it within a script, it works either way.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/kubernetes/minikube/issues/5789?email_source=notifications&email_token=AAAYYMASKYH6YWOH4KBGLQLQRHMF3A5CNFSM4JG4WQQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECVOGFI#issuecomment-548070165, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAYYMB7PGDFOIHQCZCHQ5DQRHMF3ANCNFSM4JG4WQQQ .