直接按以下部署会出来几个问题
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v1.10.1/src/deploy/recommended/kubernetes-dashboard.yaml
第一个问题是pod报以下错误,导致 CrashLoopBackOff
2019/10/12 08:37:25 Starting overwatch
2019/10/12 08:37:25 Using in-cluster config to connect to apiserver
2019/10/12 08:37:25 Using service account token for csrf signing
2019/10/12 08:37:26 Error while initializing connection to Kubernetes apiserver. This most likely means that the cluster is misconfigured (e.g., it has invalid apiserver certificates or service account's configuration) or the --apiserver-host param points to a server that does not exist. Reason: Get https://10.96.0.1:443/version: dial tcp 10.96.0.1:443: connect: no route to host
Refer to our FAQ and wiki pages for more information: https://github.com/kubernetes/dashboard/wiki/FAQ
要解决这个错误就要把Dashboard部署到Master节点,
将kubernetes-dashboard.yaml下载下来,注释