如何安装minikube的kube-dns插件? [英] How does one install the kube-dns addon for minikube?

查看:374
本文介绍了如何安装minikube的kube-dns插件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以详细说明安装 kube-dns 插件?我已经在上一个链接中下载了将近400MB的git repo,并按照说明运行make,但得到了Nothing to be done for 'all'.

文档尚不清楚存在哪些形式的加载项以及如何安装它们.在那里的管理员指南"链接带我到无用的页面.

我尝试了 https://stackoverflow.com/a/42315074/4978821 ,但得到了消息.即使此方法可行,这似乎也是一种非正式且尴尬的解决方案.

这样的答案也太含糊: https://stackoverflow.com/a/36105547/4978821 . /p>

一旦有解决方案,我很乐意创建一个拉取请求以改进文档.

已更新以澄清我的问题:

正如亚伦(Aaron)所述,默认情况下,minikube中启用了dns插件.运行minikube addons list表示已启用它.但是,如果我进入正在运行的Pod的bash外壳中,例如kubectl exec -it node-controller-poqsl bash,并尝试使用ping到达mongo服务,则它将解析为公共URL,而不是kubernetes服务IP.

解决方案

默认情况下,应该在minikube中启用kube-dns插件.您可以运行kubectl get po -n kube-system来检查addon-manager启动的pod是否在那里.如果您没有看到列出的Pod,请通过运行minikube addons list并确认kube-dnsenabled

来确保在minikube中启用了插件.

对我来说kubectl get po -n kube-system是有效的命令,这是输出:

$ kubectl get po -n kube-system
NAME                          READY     STATUS    RESTARTS   AGE
kube-addon-manager-minikube   1/1       Running   2          5d
kube-dns-v20-7ddvt            3/3       Running   6          5d
kubernetes-dashboard-rn54g    1/1       Running   2          5d

从中您可以看到kube-dns pod正常运行.您可以验证您的kube-dns吊舱处于Running状态吗?

Can someone please detail the steps necessary to install the kube-dns addon? I've downloaded the nearly 400MB git repo in the previous link and run make as instructed but get Nothing to be done for 'all'.

The docs aren't clear what form add-ons exist in, and how to install them. The "Administrators guide" link there takes me to this unhelpful page.

I've tried https://stackoverflow.com/a/42315074/4978821, but got an error validating data message. Even if this worked, it seems like it'd be an unofficial and awkward solution.

Answers like this are also too vague: https://stackoverflow.com/a/36105547/4978821.

I'd be happy to create a pull request to improve the documentation, once I have a solution.

Updated to clarify my issue:

As mentioned by Aaron, the dns addon is enabled in minikube by default. Running minikube addons list shows that it is enabled. However, if I get into a bash shell for a running pod, like such kubectl exec -it node-controller-poqsl bash and try to reach my mongo service using ping, for example, it resolves to a public URL, rather than the kubernetes service IP.

解决方案

The kube-dns addon should be enabled by default in minikube. You can run kubectl get po -n kube-system to check if the pod the addon-manager launches is there. If you don't see the pod listed, make sure that the addon is enabled in minikube by running minikube addons list and verifying that kube-dns is enabled

Edit: For me kubectl get po -n kube-system is a valid command, here is the output:

$ kubectl get po -n kube-system
NAME                          READY     STATUS    RESTARTS   AGE
kube-addon-manager-minikube   1/1       Running   2          5d
kube-dns-v20-7ddvt            3/3       Running   6          5d
kubernetes-dashboard-rn54g    1/1       Running   2          5d

You can see from this that the kube-dns pods are running correctly. Can you verify that your kube-dns pods are in the Running state?

这篇关于如何安装minikube的kube-dns插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆