1. Download the Dashboard file
Download the recommended.yaml file of the dashboard from github ( Releases kubernetes/dashboard GitHub ). After the download is complete, open this file and need to modify 2 places:
1. Modify the image download address
Change the image corresponding to kubernetes-dashboard in the Deployment part of this file to the domestic image address. I am modifying it as follows:
image: registry.cn-beijing.aliyuncs.com/iivey/kubernetes-dashboard:v2.0.3
Among them, registry.cn-beijing.aliyuncs.com/iivey/kubernetes-dashboard is the Alibaba Cloud mirror warehouse built by myself, and the dashboard version used is v2.0.3.
2. Modify kubernetes-dashboard about Service configuration
Next, modify the Service configuration part of kubernetes-dashboard in the recommended.yaml file, as follows:
kind: Service
apiVersion: v1
metadata:
labels:
k8s-app: kubernetes