【minikube】——dashboard无法打开google chrome浏览器问题
一、前言
minikube的安装和介绍详见我的另一篇博客:[https://blog.csdn.net/weixin\_40449300/article/details/100110560][https_blog.csdn.net_weixin_40449300_article_details_100110560]
二、问题
运行:**sudo minikube dashboard**打开谷歌浏览器失败,报错如下:
$ sudo minikube dashboard
? Verifying dashboard health ...
? Launching proxy ...
? Verifying proxy health ...
? Opening http://127.0.0.1:36241/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/ in your default browser...
[2969:2969:1003/021903.262759:ERROR:zygote_host_impl_linux.cc(90)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
[2980:2980:1003/021903.290700:ERROR:zygote_host_impl_linux.cc(90)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
Running Firefox as root in a regular user's session is not supported. ($HOME is /home/SENSETIME/tangqing2 which is owned by SENSETIME\tangqing2.)
/usr/bin/xdg-open: 778: /usr/bin/xdg-open: iceweasel: not found
/usr/bin/xdg-open: 778: /usr/bin/xdg-open: seamonkey: not found
/usr/bin/xdg-open: 778: /usr/bin/xdg-open: mozilla: not found
/usr/bin/xdg-open: 778: /usr/bin/xdg-open: epiphany: not found
/usr/bin/xdg-open: 778: /usr/bin/xdg-open: konqueror: not found
/usr/bin/xdg-open: 778: /usr/bin/xdg-open: chromium-browser: not found
[3009:3009:1003/021903.340752:ERROR:zygote_host_impl_linux.cc(90)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
/usr/bin/xdg-open: 778: /usr/bin/xdg-open: www-browser: not found
/usr/bin/xdg-open: 778: /usr/bin/xdg-open: links2: not found
/usr/bin/xdg-open: 778: /usr/bin/xdg-open: elinks: not found
/usr/bin/xdg-open: 778: /usr/bin/xdg-open: links: not found
/usr/bin/xdg-open: 778: /usr/bin/xdg-open: lynx: not found
/usr/bin/xdg-open: 778: /usr/bin/xdg-open: w3m: not found
xdg-open: no method available for opening 'http://127.0.0.1:36241/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/'
? failed to open browser: exit status 3
原因:由于ubuntu16.04系统自带的是Firefox浏览器,需要安装Chrome浏览器,此处安装时用的普通用户,root用户无法打开。需要修改配置。
解决方案:
$ whereis google-chrome
google-chrome: /usr/bin/google-chrome /usr/share/man/man1/google-chrome.1.gz
$ sudo vi /usr/bin/google-chrome
#将google-chrome文件中最后一行注释掉,改为下边的
# Note: exec -a below is a bashism.
# exec -a "$0" "$HERE/chrome" "$@"
exec -a "$0" "$HERE/chrome" "$@" --user-data-dir --no-sandbox
至此问题解决,重新运行:sudo minikube dashboard** 便可打开监控**界面。
还没有评论,来说两句吧...