下載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