Environment:
Kubernetes 1.5.2
Kubernetes-dashboard 1.5.1
Pull Mirror to local first:
Docker Pull docker.io/ist0ne/kubernetes-dashboard-amd64:v1.5.1
VI Kubernetes-dashboard.yaml
' Kind:deployment
Apiversion:extensions/v1beta1
Metadata
Labels
App:kubernetes-dashboard
Name:kubernetes-dashboard
Namespace:kube-system
Spec
Replicas:1
Selector
Matchlabels:
App:kubernetes-dashboard
Template
Metadata
Labels
App:kubernetes-dashboard
Comment the following annotation 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-dashboard image: docker.io/ist0ne/kubernetes-dashboard-amd64:v1.5.1 imagePullPolicy: IfNotPresent ports: - containerPort: 9090 protocol: TCP args: # Uncomment the following line to manually specify Kubernetes API server Host # If not specified, Dashboard will attempt to auto discover the API server and connect # to it. Uncomment only if the default does not work. - --apiserver-host=http://192.168.206.129:8080 #注意这里是api的地址 livenessProbe: httpGet: path: / port: 9090 initialDelaySeconds: 30
Kind:service
Apiversion:v1
Metadata
Labels
App:kubernetes-dashboard
Name:kubernetes-dashboard
Namespace:kube-system
Spec
Type:nodeport
Ports
- Port:80
targetport:9090
Selector
App:kubernetes-dashboard '
Create Depolyment:
Kubectl create-f Kubernetes-dashboard.yaml
Verify pod:
Kubectl Get pod--namespace=kube-system
To view pod status:
Kubectl describe PODS/KUBERNETES-DASHBOARD-2461704970-T1WGX--namespace=kube-system
If error, delete depolyment:
Kubectl delete-f Kubernetes-dashboard.yaml
Installing Kubernetes-dashboard