下载dashboard的yaml文件html
wget -O kube-dashboard.yaml https://git.io/kube-dashboard-no-rbac
这个版本是没有权限控制的版本git
准备镜像github
docker save gcr.io/google_containers/kubernetes-dashboard-amd64:v1.6.3 >1.6.3.tar docker load < dns.tar docker tag gcr.io/google_containers/kubernetes-dashboard-amd64:v1.6.3 harbor.biglittleant.cn/test/kubernetes-dashboard-amd64:v1.6.3
这一步须要有FQ能能力。不然dashboard的镜像是下载不了的。docker
spec: containers: - name: kubernetes-dashboard image: harbor.biglittleant.cn/test/kubernetes-dashboard-amd64:v1.6.3 ports: - containerPort: 9090 protocol: TCP args: # Uncomment the following line to manually specify Kubernetes API server Host # If not specified, Dashboard will attempt to auto discover the API server and connect # to it. Uncomment only if the default does not work. - --apiserver-host=http://192.168.56.12:8080
须要修改image,更新为线下的地址。
配置apiserver-host的地址。shell
建立dashboard服务api
kubectl create -f kube-dashboard.yaml
查看服务是否正常浏览器
kubectl get services --all-namespaces kube-system kubernetes-dashboard 10.254.174.119 <none> 80/TCP 2d
浏览器访问:192.16856.12:8080/ui
ui