【minikube】——dashboard无法打开google chrome浏览器问题

古城微笑少年丶 2023-06-01 08:44 99阅读 0赞

一、前言

  1. minikube的安装和介绍详见我的另一篇博客:[https://blog.csdn.net/weixin\_40449300/article/details/100110560][https_blog.csdn.net_weixin_40449300_article_details_100110560]

二、问题

  1. 运行:**sudo minikube dashboard**打开谷歌浏览器失败,报错如下:
  2. $ sudo minikube dashboard
  3. ? Verifying dashboard health ...
  4. ? Launching proxy ...
  5. ? Verifying proxy health ...
  6. ? Opening http://127.0.0.1:36241/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/ in your default browser...
  7. [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.
  8. [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.
  9. Running Firefox as root in a regular user's session is not supported. ($HOME is /home/SENSETIME/tangqing2 which is owned by SENSETIME\tangqing2.)
  10. /usr/bin/xdg-open: 778: /usr/bin/xdg-open: iceweasel: not found
  11. /usr/bin/xdg-open: 778: /usr/bin/xdg-open: seamonkey: not found
  12. /usr/bin/xdg-open: 778: /usr/bin/xdg-open: mozilla: not found
  13. /usr/bin/xdg-open: 778: /usr/bin/xdg-open: epiphany: not found
  14. /usr/bin/xdg-open: 778: /usr/bin/xdg-open: konqueror: not found
  15. /usr/bin/xdg-open: 778: /usr/bin/xdg-open: chromium-browser: not found
  16. [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.
  17. /usr/bin/xdg-open: 778: /usr/bin/xdg-open: www-browser: not found
  18. /usr/bin/xdg-open: 778: /usr/bin/xdg-open: links2: not found
  19. /usr/bin/xdg-open: 778: /usr/bin/xdg-open: elinks: not found
  20. /usr/bin/xdg-open: 778: /usr/bin/xdg-open: links: not found
  21. /usr/bin/xdg-open: 778: /usr/bin/xdg-open: lynx: not found
  22. /usr/bin/xdg-open: 778: /usr/bin/xdg-open: w3m: not found
  23. xdg-open: no method available for opening 'http://127.0.0.1:36241/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/'
  24. ? failed to open browser: exit status 3

原因:由于ubuntu16.04系统自带的是Firefox浏览器,需要安装Chrome浏览器,此处安装时用的普通用户,root用户无法打开。需要修改配置。

解决方案:

  1. $ whereis google-chrome
  2. google-chrome: /usr/bin/google-chrome /usr/share/man/man1/google-chrome.1.gz
  3. $ sudo vi /usr/bin/google-chrome
  4. #将google-chrome文件中最后一行注释掉,改为下边的
  5. # Note: exec -a below is a bashism.
  6. # exec -a "$0" "$HERE/chrome" "$@"
  7. exec -a "$0" "$HERE/chrome" "$@" --user-data-dir --no-sandbox

至此问题解决,重新运行:sudo minikube dashboard** 便可打开监控**界面。

发表评论

表情:
评论列表 (有 0 条评论,99人围观)

还没有评论,来说两句吧...

相关阅读