当前位置:网站首页>[cloud native]kubernetes visual interface webui kubernetes dashboard

[cloud native]kubernetes visual interface webui kubernetes dashboard

2022-06-10 03:37:00 kiranet

1.Kubernetes Dashboard

Dashboard It's web based Kubernetes The user interface . You can use Dashboard Deploy the container application to Kubernetes In the cluster , You can also apply debugging to containers , It can also manage cluster resources . You can use Dashboard Get the overview information of the applications running in the cluster , You can also create or modify Kubernetes resources ( Such as Deployment,Job,DaemonSet wait ). for example , You can be right Deployment Achieve elastic scaling 、 Initiate rolling upgrade 、 restart Pod Or use the wizard to create a new application .

Dashboard At the same time, it shows Kubernetes Resource status information and all error messages in the cluster .

2. install

By default... Is not deployed Dashboard. You can deploy with the following command :

kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0/aio/deploy/recommended.yaml

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

Use https://www.ipaddress.com/ Inquire about raw.githubusercontent.com Of IP, Set up host file

#sudo vim /etc/hosts
199.232.96.133 raw.githubusercontent.com
#kubectl edit cm kube-proxy -n kube-system
 In the configuration file 
 Find out mode project , My current configuration is mode:“”, It is amended as follows mode: "ipvs"
#kubectl get pod -n kube-system | grep kube-proxy | awk '{system("kubectl delete pod "$1" -n kube-system")

function

#kubectl proxy
 visit 
http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/ 

3. visit Kubernetes Dashboard

After successful startup, we will see the following interface

Run... On the console , Copy the generated token You can log in at the input box .

#kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep admin-user | awk '{print $1}')

 

quote :1.https://kubernetes.io/zh/docs/tasks/access-application-cluster/web-ui-dashboard/

原网站

版权声明
本文为[kiranet]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/160/202206091405185655.html