How to install kube-dns addon for mini cube?

Can anyone comment on the steps required to install the kube-dns addon? I downloaded almost 400MB git repo in the previous link and ran make

as instructed, but I getNothing to be done for 'all'.

The docs are not quite clear what form add-ins are and how to install them. The Administrator's Guide link takes me to this useless page.

I tried this StackOverflow question but I got a post error validating data

. Even if it worked, it looks like it would be an unofficial and awkward solution.

The answers are also a bit too vague: https://stackoverflow.com/a/12452329 .

I would be happy to create a pull request to improve the documentation as soon as I have a solution.

Updated to clarify my problem:

As mentioned by Aaron, the dns addon is enabled by default in the minibook. Startup minikube addons list

shows it is on. However, if I hit a bash shell for a running module, for example, kubectl exec -it node-controller-poqsl bash

and try to ping my mongo service, for example, it resolves the public url and not the kubernetes IP.

+4


source to share


3 answers


The kube-dns add-on should be enabled by default in minikube. You can run kubectl get po -n kube-system

to check if the pod addon-manager is running. If you do not see the listed list, make sure the addon is enabled in the mini cube by running minikube addons list

and confirming that kube-dns

there isenabled

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

      

From this you can see that the kube-dns buttons are working correctly. Can you verify that your kube-dns cubes are in state Running

?

+7


source


This fix is ​​for VirtualBox drivers only - confirm your driver with

cat ~/.minikube/machines/minikube/config.json | grep DriverName

      

The accepted answer is correct that kube-dns is installed and enabled by default. But it seems like a common problem is that no containers for DNS management are created, so it seems that kube-dns is not installed.

For example:

$ kubectl get po -n kube-system
kube-addon-manager-minikube   1/1       Running   1          1m

      

You can confirm that kube-dns is installed and enabled (although not working):

$ minikube addons list
- addon-manager: enabled
- dashboard: enabled
- kube-dns: enabled
{snipped}

      



The main issue is with VirtualBox as described here: https://forums.virtualbox.org/viewtopic.php?f=7&t=50368

Fix:

minikube stop    
VBoxManage modifyvm "VM name" --natdnshostresolver1 on
minikube start

kubectl get all -n kube-system

      

The name of the virtual machine is probably "minikube". If the last command doesn't return a large list of modules (including kube-dns and kube-dashboard), wait a few minutes - I have a few empty results before success.

For Windows users, VBoxManage is installed by default in the c: \ Program Files \ Oracle \ VirtualBox directory

More information at https://superuser.com/questions/641933

+1


source


coredns-69cbb76ff8-sxbxs                   1/1     Running            0          10m
coredns-69cbb76ff8-wwht2                   1/1     Running            0          10m
default-http-backend-5ff9d456ff-2klrx      1/1     Running            1          20h
etcd-minikube                              1/1     Running            1          20h
kube-addon-manager-minikube                1/1     Running            1          20h
kube-apiserver-minikube                    1/1     Running            1          20h
kube-controller-manager-minikube           1/1     Running            3          20h
kube-scheduler-minikube                    1/1     Running            3          20h
kubernetes-dashboard-ccc79bfc9-zxnw7       0/1     CrashLoopBackOff   9          23m
nginx-ingress-controller-7c66d668b-56mb2   1/1     Running            2          20h
storage-provisioner                        1/1     Running            1          20h

      

there is no cube-dns. how to install it? I'm running a minicube

0


source







All Articles