接上篇,kubernetes-dashboard安装完访问出现各种问题,但又不想来回重新装,所以跟遇到的问题来回折腾。

采坑第一:master和node上都要安装好docker,因为安装k8s的时候会安装自带的docker,在

yum install docker-engine

提示报错:docker-engine conflicts with 2:docker-1.12.6-68.gitec8512b.el7.centos.x86_64

解决方法:yum install docker-engine  --skip-broken


采坑第二:在master上运行docker ps 发现报错,以前一直以为装完没问题。

提示报错:

Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.

解决方法:可能是跟操作系统有关系不支持selinux(centos7)

vi  /etc/sysconfig/docker

OPTIONS=‘--selinux-enabled=false --log-driver=journald --signature-verification=false‘

if [ -z "${DOCKER_CERT_PATH}" ]; then

DOCKER_CERT_PATH=/etc/docker

fi

重启docker    systemctl  restart docker 

采坑第三:在访问http://ip:8080/ui提示

Error: 'dial tcp 10.0.66.2:9090: getsockopt: connection timed out'

Trying to reach: 'http://10.0.66.2:9090/'

解决方法:vi /usr/lib/systemd/system/docker.service

 [Service] 下添加

ExecStartPost=/sbin/iptables -I FORWARD -s 0.0.0.0/0 -j ACCEPT

采坑第四:访问http://121.201.29.62:8080/ui时报错:

{

  "kind": "Status",

  "apiVersion": "v1",

  "metadata": {},

  "status": "Failure",

  "message": "no endpoints available for service \"kubernetes-dashboard\"",

  "reason": "ServiceUnavailable",

  "code": 503

}

执行kubectl get pods --namespace kube-system查看状态是不是running,如果不是查看node的镜像是否启动。因为我的dashboard是装在master上,然后k8s服务image是在node上,在master上操作没关注node上image是否在启动,最后node的镜像启动了,访问就没问题了。

最后是久违了的dashboard

 


GitHub 加速计划 / da / dashboard
14.17 K
4.13 K
下载
General-purpose web UI for Kubernetes clusters
最近提交(Master分支:2 个月前 )
9a476333 Bumps [jest-preset-angular](https://github.com/thymikee/jest-preset-angular) from 14.2.0 to 14.2.2. - [Release notes](https://github.com/thymikee/jest-preset-angular/releases) - [Changelog](https://github.com/thymikee/jest-preset-angular/blob/main/CHANGELOG.md) - [Commits](https://github.com/thymikee/jest-preset-angular/compare/v14.2.0...v14.2.2) --- updated-dependencies: - dependency-name: jest-preset-angular dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 3 个月前
11b7e82e Bumps [cypress](https://github.com/cypress-io/cypress) from 13.13.1 to 13.13.2. - [Release notes](https://github.com/cypress-io/cypress/releases) - [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md) - [Commits](https://github.com/cypress-io/cypress/compare/v13.13.1...v13.13.2) --- updated-dependencies: - dependency-name: cypress dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 3 个月前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐