【k8s】安装dashboard以及报错处理

安装步骤:

  1. 点击进入dashboard 的 GitHub - kubernetes/dashboard: General-purpose web UI for Kubernetes clustersicon-default.png?t=N176https://github.com/kubernetes/dashboard

  2. 查看当前k8s版本对应的dashboard版本,点击右边releases【k8s】安装dashboard以及报错处理_第1张图片

  3.  执行对应版本指令安装(我的k8s是v1.23)

【k8s】安装dashboard以及报错处理_第2张图片 

 

执行下方指令安装:
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.5.1/aio/deploy/recommended.yaml

 安装报错信息:

The connection to the server raw.githubusercontent.com was refused - did you specify the right host or port?

解决办法:

  • 直接浏览器打开上述指令中的地址

https://raw.githubusercontent.com/kubernetes/dashboard/v2.5.1/aio/deploy/recommended.yaml 打开后其实是一个文本信息 

【k8s】安装dashboard以及报错处理_第3张图片 

  • 本地创建相同文件,复制浏览器中打开的内容 
vi recommended.yaml
  •  执行下面指令重新安装
kubectl apply -f recommended.yaml
  • 出现下面信息,即问题解决 

namespace/kubernetes-dashboard created serviceaccount/kubernetes-dashboard created service/kubernetes-dashboard created secret/kubernetes-dashboard-certs created secret/kubernetes-dashboard-csrf created secret/kubernetes-dashboard-key-holder created configmap/kubernetes-dashboard-settings created role.rbac.authorization.k8s.io/kubernetes-dashboard created clusterrole.rbac.authorization.k8s.io/kubernetes-dashboard created rolebinding.rbac.authorization.k8s.io/kubernetes-dashboard created clusterrolebinding.rbac.authorization.k8s.io/kubernetes-dashboard created deployment.apps/kubernetes-dashboard created service/dashboard-metrics-scraper created deployment.apps/dashboard-metrics-scraper created 

 

 

你可能感兴趣的:(k8s,kubernetes,docker,容器)