我似乎无法从 minikube 机器中找到 Kubernetes API IP 地址,使用minikube ssh
.
nslookup kubernetes.default.svc.cluster.local 10.0.0.1
Server: 10.0.0.1
Address 1: 10.0.0.1
nslookup: can't resolve 'kubernetes.default.svc.cluster.local'
同样的事情发生在 just 上kubernetes
。即使 kube-dns pod 似乎可以正常运行,也会发生这种情况:
# kubectl -n kube-system get pods
NAME READY STATUS RESTARTS AGE
kube-addon-manager-minikube 1/1 Running 0 9m
kube-dns-910330662-16bvw 3/3 Running 0 8m
kubernetes-dashboard-vbn9m 1/1 Running 0 8m
cluster-info 中没有 KubeDNS 信息(但转储中没有任何主要内容):
# kubectl cluster-info
Kubernetes master is running at https://192.168.64.26:8443
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
kubectl 的版本:
# kubectl version
Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.5", GitCommit:"17d7182a7ccbb167074be7a87f0a68bd00d58d97", GitTreeState:"clean", BuildDate:"2017-08-31T09:14:02Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.0", GitCommit:"d3ada0119e776222f11ec7945e6d860061339aad", GitTreeState:"clean", BuildDate:"2017-07-26T00:12:31Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
和迷你库:
# minikube version
minikube version: v0.21.0
这发生在 OSX 上,并且都使用 xhyve 和 virtualbox 作为驱动程序。
minikube 问题跟踪器中有很多 minikube/dns 问题,但没有一个像这样。kubectl cluster-info
具有 kube-dns 工作的 minikube的输出应该是什么样的?怎么样nslookup
,不应该工作吗?
编辑。minikube似乎kubectl cluster-info
正在返回它应该返回的内容,但我什至无法从 kube-dns pod 内部解析 kubernetes:
# kubectl -n kube-system exec -it kube-dns-910330662-1n64f -c kubedns -- nslookup kubernetes.default.svc.cluster.local localhost
Server: 127.0.0.1
Address 1: 127.0.0.1 localhost
nslookup: can't resolve 'kubernetes.default.svc.cluster.local': Name does not resolve
哪个真的应该工作?