This article will introduce the creation and use of Kube-ui (also called dashboard) on the basis of the previous article. This thing is essentially the WebUI connection Master API interface, through the API to obtain information about the k8s cluster, and then on the web display, for the user is more friendly, the actual use is not very large.
One, download the image file and incorporate the unified management of the local warehouse
# docker pull docker.io/mritd/kubernetes-dashboard-amd64# docker tag docker.io/mritd/kubernetes-dashboard-amd64 registry.fjhb.cn/kubernetes-dashboard-amd64# docker push registry.fjhb.cn/kubernetes-dashboard-amd64
Second, create deployment and service according to RC file
# cat Kube-ui-rc.yaml # Copyright Google Inc. All rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # You are not a use of this file except in compliance with the License. # Obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # unless required by AP Plicable law or agreed to in writing, software # Distributed under the License are distributed on a "as is" BASIS, # WIT HOUT warranties or CONDITIONS of any KIND, either express or implied. # See the License for the specific language governing permissions and # Limitations under the License. # Configuration to deploy release version of the Dashboard UI. # # Example Usage:kubectl create-f <this_file> kind:deployment Apiversion:extensions/v1beta1metadata:labe Ls:app:kubernetes-dashboard version:latest Name:kubernetes-dashboard Namespace:default spec:replic As:1 selector:matchlabels:app:kubernetes-dAshboard Template:metadata:labels:app:kubernetes-dashboard # Comment the following Anno Tation if Dashboard must not being deployed on Master annotations:scheduler.alpha.kubernetes.io/tolerations: | [{"Key": "Dedicated", "operator": "Equal", "Value": "Master", "Effect": "Noschedule"}] spec:containers:-Name:kubernetes-dashboa RD IMAGE:REGISTRY.FJHB.CN/KUBERNETES-DASHBOARD-AMD64 Imagepullpolicy:always Ports:-CO ntainerport:9090 protocol:tcp args: # Uncomment the following line to manually specify Ku Bernetes API Server Host # IF not specified, Dashboard would attempt to auto Discover the API server and connect # to it. Uncomment only if the default does isn't work. ---apiserver-host=192.168.115.5:8080 Livenessprobe: Httpget:path:/port:9090 initialdelayseconds:30 timeoutseconds:30 ---kind:service apiversion:v1 metadata:labels:app:kubernetes-dashboard name:kubernetes-dashboard Namespace:defaultspec:type:NodePort ports:-port:80 targetport:9090 selector:app:kubernetes- Dashboard
# kubectl create -f kube-ui-rc.yaml # kubectl get svc# kubectl get pod
Third, Web Access testing
IP plus ports with two node nodes can be accessed to the Web-ui interface, which is essentially implemented using the iptables NAT rule
You can see it in the panel.
Node, deployments, replica sets, replication controllers, pod, jobs, services, ingress, storage, secret and other information, In essence, queries are made by connecting Apiserver and displayed on Web-ui.
Kubernetes Cluster Configuration Dashboard Service