Deploy Kubernetes-dashboard on the basis of the deployment of Kubernetes, which is the official Kubernets cluster Visualizer for user management, and the deployment dashboard is actually the same as deploying other applications in Kubernets, Create dashboard required replication Controller, service services can be;
Note that the overlay network of Kubernets is working properly, each node has started flannel, and Docker is configured with a flannel-provided subnet, or in other ways to ensure connectivity between container, Otherwise dashboard will not work properly;
Create 2 files: Kube-dashboard-rc.yaml and Kube-dashboard-svc.yaml
Kube-dashboard-rc.yaml content is as follows:
Apiversion: v1kind: replicationcontrollermetadata: name: kubernetes-dashboard-v1 namespace: kube-system labels: k8s-app: kubernetes-dashboard version: latest kubernetes.io/ cluster-service: "true" spec: replicas: 1 selector: k8s-app: kubernetes-dashboard template: metadata: labels: k8s-app: kubernetes-dashboard version: latest kubernetes.io/cluster-service: "true" spec: containers: - name: kubernetes-dashboard image: docker.io/mritd/kubernetes-dashboard-amd64 resources: limits: cpu: 100m memory: 50Mi requests: cpu: 100m memory: 50Mi ports: - containerPort: 9090 args: - --apiserver-host=http://3.3.3.111:8080 livenessProbe: httpget: path: / port: 9090 initialDelaySeconds: 30 Timeoutseconds: 30 kube-dashboard-svc.yaml content is as follows: apiversion: v1kind: servicemetadata: name: kubernetes-dashboard-v1 namespace: kube-system labels: k8s-app: kubernetes-dashboard kubernetes.io/cluster-service: "true" spec: selector: k8s-app: Kubernetes-dashboard ports: - port: 9090 nodeport: 31111 protocol: TCP type: NodePort by Command: Kubectl creat -f kube-dashboard-rc.yaml&nbsP; kubectl creat -f kube-dashboard-rc.yaml
This article is from the "Network Technology exploration" blog, please be sure to keep this source http://heshengkai.blog.51cto.com/5014551/1946256
Kubernetes Dashboard Installation