Closed Pacheco95 closed 5 years ago
You can use minikube service --url
, if you want to use it with the unsupported none
driver ?
--url Display the kubernetes service URL in the CLI instead of opening it in the default browser
But as long as you have the proper kube config, there is no need to run kubectl
as the root user...
This is kind of a dupe of #2548 - but there is something we can do to make peoples lives easier here.
The issue is that your X environment isn't configured to allow apps from one user draw in your display environment. This could also be fixed by implementing https://github.com/kubernetes/minikube/issues/3138 - we should be complaining very loudly when people execute minikube as root.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
If anyone feels interest in fixing this issue, my recommendation would be to check if the current user id is 0 and simply display the URL here:
https://golang.org/pkg/os/user should help.
Would like to work on it
Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT
Please provide the following details:
Environment:
Minikube version:
OS:
VM Driver:
michael@MICHAEL-PC:~$ sudo cat ~/.minikube/machines/minikube/config.json | grep -i ISO
minikube version echo ""; echo "OS:"; cat /etc/os-release echo ""; echo "VM driver:"; grep DriverName ~/.minikube/machines/minikube/config.json echo ""; echo "ISO version"; grep -i ISO ~/.minikube/machines/minikube/config.json
Opening kubernetes service default/hello-node in default browser... Running Firefox as root in a regular user's session is not supported. ($HOME is /home/michael which is owned by michael.) Running Firefox as root in a regular user's session is not supported. ($HOME is /home/michael which is owned by michael.) Running Firefox as root in a regular user's session is not supported. ($HOME is /home/michael which is owned by michael.) /usr/bin/xdg-open: 851: /usr/bin/xdg-open: iceweasel: not found /usr/bin/xdg-open: 851: /usr/bin/xdg-open: seamonkey: not found /usr/bin/xdg-open: 851: /usr/bin/xdg-open: mozilla: not found /usr/bin/xdg-open: 851: /usr/bin/xdg-open: epiphany: not found /usr/bin/xdg-open: 851: /usr/bin/xdg-open: konqueror: not found /usr/bin/xdg-open: 851: /usr/bin/xdg-open: chromium: not found /usr/bin/xdg-open: 851: /usr/bin/xdg-open: chromium-browser: not found /usr/bin/xdg-open: 851: /usr/bin/xdg-open: google-chrome: not found /usr/bin/xdg-open: 851: /usr/bin/xdg-open: www-browser: not found /usr/bin/xdg-open: 851: /usr/bin/xdg-open: links2: not found /usr/bin/xdg-open: 851: /usr/bin/xdg-open: elinks: not found /usr/bin/xdg-open: 851: /usr/bin/xdg-open: links: not found /usr/bin/xdg-open: 851: /usr/bin/xdg-open: lynx: not found /usr/bin/xdg-open: 851: /usr/bin/xdg-open: w3m: not found xdg-open: no method available for opening 'http://192.168.2.110:32295'
michael@MICHAEL-PC:~$ sudo kubectl create deployment hello-node --image=gcr.io/hello-minikube-zero-install/hello-node deployment.apps/hello-node created
michael@MICHAEL-PC:~$ sudo kubectl get deployments NAME READY UP-TO-DATE AVAILABLE AGE hello-node 0/1 1 0 13s
michael@MICHAEL-PC:~$ sudo kubectl get pods
NAME READY STATUS RESTARTS AGE hello-node-64c578bdf8-h4lkb 1/1 Running 0 64m
michael@MICHAEL-PC:~$ sudo kubectl get deployments NAME READY UP-TO-DATE AVAILABLE AGE hello-node 1/1 1 1 65m
michael@MICHAEL-PC:~$ sudo kubectl get events LAST SEEN TYPE REASON KIND MESSAGE 33m Normal Pulled Pod Successfully pulled image "gcr.io/hello-minikube-zero-install/hello-node" 33m Warning Failed Pod Error: cannot find volume "default-token-4jlfh" to mount into container "hello-node" 33m Normal Pulled Pod Successfully pulled image "gcr.io/hello-minikube-zero-install/hello-node" 33m Normal Created Pod Created container 33m Normal Started Pod Started container
michael@MICHAEL-PC:~$ sudo kubectl config view apiVersion: v1 clusters:
michael@MICHAEL-PC:~$ sudo kubectl expose deployment hello-node --type=LoadBalancer --port=8080 service/hello-node exposed
michael@MICHAEL-PC:~$ sudo kubectl get services NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE hello-node LoadBalancer 10.99.154.58 8080:32295/TCP 30s
kubernetes ClusterIP 10.96.0.1 443/TCP 3h5
michael@MICHAEL-PC:~$ sudo minikube service hello-node Opening kubernetes service default/hello-node in default browser... Running Firefox as root in a regular user's session is not supported. ($HOME is /home/michael which is owned by michael.) Running Firefox as root in a regular user's session is not supported. ($HOME is /home/michael which is owned by michael.) Running Firefox as root in a regular user's session is not supported. ($HOME is /home/michael which is owned by michael.) /usr/bin/xdg-open: 851: /usr/bin/xdg-open: iceweasel: not found /usr/bin/xdg-open: 851: /usr/bin/xdg-open: seamonkey: not found /usr/bin/xdg-open: 851: /usr/bin/xdg-open: mozilla: not found /usr/bin/xdg-open: 851: /usr/bin/xdg-open: epiphany: not found /usr/bin/xdg-open: 851: /usr/bin/xdg-open: konqueror: not found /usr/bin/xdg-open: 851: /usr/bin/xdg-open: chromium: not found /usr/bin/xdg-open: 851: /usr/bin/xdg-open: chromium-browser: not found /usr/bin/xdg-open: 851: /usr/bin/xdg-open: google-chrome: not found /usr/bin/xdg-open: 851: /usr/bin/xdg-open: www-browser: not found /usr/bin/xdg-open: 851: /usr/bin/xdg-open: links2: not found /usr/bin/xdg-open: 851: /usr/bin/xdg-open: elinks: not found /usr/bin/xdg-open: 851: /usr/bin/xdg-open: links: not found /usr/bin/xdg-open: 851: /usr/bin/xdg-open: lynx: not found /usr/bin/xdg-open: 851: /usr/bin/xdg-open: w3m: not found xdg-open: no method available for opening 'http://192.168.2.110:32295'