kind: Deployment
apiVersion: extensions
/v1beta1
metadata:
labels:
app: kubernetes
-dashboard name: kubernetes
-dashboard namespace: kube
-system
spec:
replicas:
1 revisionHistoryLimit:
10 selector:
matchLabels:
app: kubernetes
-dashboard template:
metadata:
labels:
app: kubernetes
-dashboard # Comment the following annotation
if Dashboard must not be deployed on master annotations:
scheduler.alpha.kubernetes.io
/tolerations: |
[
{
"key": "dedicated","operator": "Equal","value": "master","effect": "NoSchedule" }
]
spec:
containers:
- name: kubernetes-dashboard image: myhub.fdccloud.com
/library/kubernetes-dashboard-amd64:v1.5.1 imagePullPolicy: Always
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://10.5.10.116:8080
Using HTTP port: 9090
Error
while initializing connection to Kubernetes apiserver. This most likely means that the cluster is misconfigurhas invalid apiserver certificates or service accounts configuration) or the --apiserver-host param points to a ser not exist. Reason: invalid configuration: no configuration has been provided
Refer to the troubleshooting guide
for more information: https://github.com/kubernetes/dashboard/blob/master/docs/uubleshooting.md