Running Kubernetes Minikube service giving me "cannot open browser" errors

8/5/2018

I follow this tutorial about Kubernetes.

I got to the part, which guide me to run:

minikube service sa-frontend-lb

(I used sudo to run it, because if I don't use sudo it ask me to use sudo).

I get those following errors:

Opening kubernetes service default/sa-frontend-lb in default browser...
No protocol specified
No protocol specified

(firefox:4538): Gtk-WARNING **: 22:07:38.395: cannot open display: :0
/usr/bin/xdg-open: line 881: x-www-browser: command not found
No protocol specified
No protocol specified

(firefox:4633): Gtk-WARNING **: 22:07:39.112: cannot open display: :0
/usr/bin/xdg-open: line 881: iceweasel: command not found
/usr/bin/xdg-open: line 881: seamonkey: command not found
/usr/bin/xdg-open: line 881: mozilla: command not found
No protocol specified
Unable to init server: Could not connect: Connection refused
Failed to parse arguments: Cannot open display: 
/usr/bin/xdg-open: line 881: konqueror: command not found
/usr/bin/xdg-open: line 881: chromium: command not found
[4749:4749:0805/220740.485576:ERROR:zygote_host_impl_linux.cc(88)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
[4757:4757:0805/220740.725100:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
/usr/bin/xdg-open: line 881: www-browser: command not found
/usr/bin/xdg-open: line 881: links2: command not found
/usr/bin/xdg-open: line 881: elinks: command not found
/usr/bin/xdg-open: line 881: links: command not found

I installed chromium and xdg-utils, but neither works.

How can I enter to the service, to see that it works?

-- Yagel
fedora
kubectl
kubernetes
minikube

1 Answer

8/6/2018

As one can see, it is attempting to launch a browser, but there are none installed that it recognizes, except for what I would guess is Chrome (since one can see that "chromium" did not work out), and as the message indicates, it doesn't tolerate running as root.

In that case, what you want is actually:

minikube service --url sa-frontend-lb

which causes minikube to print the URL rather than attempting to use xdg-open to launch a browser.

-- mdaniel
Source: StackOverflow