First, K8S management interface
Here are three main examples:
-
The official kubernetes – dashboard
-
Rancher
-
Kuboard
Two, installation steps
1, the preface
I deployed the dashboard V1.x version before. Later, when Dashboard was upgraded, it was always inaccessible after being deployed in accordance with the previous deployment mode. Later, I went to Github to find the latest dashboard deployment mode, which is hereby recorded
2. Official installation
Step1: Installation method is similar to K8S pod creation, through kubectl apply
$kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.3/aio/deploy/recommended.yamlCopy the code
Step2: if you cannot pull it, you can configure it in hosts
Echo 151.101.108.133 "raw.githubusercontent.com" > > / etc/hostsCopy the code
Note: When selecting the version, note that you must download the dashboard corresponding to your OWN K8S version, otherwise, 404 will be reported on the Web interface. So you want to look at Compatibility in the version
See the official project address for each version:
Github.com/kubernetes/…
github.com
Step3: optimize the configuration file (modify the corresponding image configuration in case it cannot be downloaded in China)
I changed this service to NodePort for deployment, which is convenient for subsequent testing. The address of the mirror was also changed to the address of Ali Cloud warehouse and the address of the configuration file:
Click on the direct
github.com
The P.S. ecommended. Yaml file needs two modifications
-
Recommended. Yaml changes the address of the image to (the default image cannot be downloaded) :
registry.cn-hangzhou.aliyuncs.com/kubernetes_ns/dashboard:v2.0.3
-
Recommended. Yaml specifies a nodeport port for easy access on a host
See this article for details on how to modify:
www.cnblogs.com/caoxb/p/
www.cnblogs.com
Step4: Getting a Bearer Token(login to WEB pages is required)
kubectl -n kubernetes-dashboard describe secret $(kubectl -n kubernetes-dashboard get secret | grep admin-user | awk '{print $1}')
Copy the code
Step5: check service ports
[root@master ~]# kubectl get svc -n kubernetes-dashboard NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE Dashboard-metrics -scraper ClusterIP 10.100.164.29 < None > 8000/TCP 11h kubernetes-Dashboard NodePort 10.107.131.103 <none> 443:32136/TCP 11hCopy the code
Step6: Login verification
https://IP:Port