通过一些故障排除,我发现kube dns在我的minikube集群中没有按预期工作。当我这样做时,我可以看到kube dns插件已启用
minikube addons list
命令,并且还有一个kube dns服务正在运行,但没有运行kube dns吊舱。
$ kubectl get all -n kube-system
NAME READY STATUS RESTARTS AGE
po/kube-addon-manager-minikube 1/1 Running 0 15m
po/kubernetes-dashboard-bltvf 1/1 Running 0 14m
NAME DESIRED CURRENT READY AGE
rc/kubernetes-dashboard 1 1 1 14m
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
svc/kube-dns 10.0.0.10 <none> 53/UDP,53/TCP 14m
svc/kubernetes-dashboard 10.0.0.192 <nodes> 80:30000/TCP 14m
$ kubectl get ep kube-dns --namespace=kube-system
NAME ENDPOINTS AGE
kube-dns <none> 19m
kube-dns-controller.yaml
手动创建/部署文件,但在验证该文件时也会出错:
error: error validating "kube-dns-controller.yaml": error validating data: [found invalid field optional for v1.ConfigMapVolumeSource, found invalid field tolerations for v1.PodSpec]; if you choose to ignore these errors, turn validation off with --validate=false
注意:我使用的是minikube v0.19.1版和kubernetes v1.5.2版。