Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minikube coredns doesn't work #7512

Closed
zehuaiWANG opened this issue Apr 8, 2020 · 7 comments
Closed

minikube coredns doesn't work #7512

zehuaiWANG opened this issue Apr 8, 2020 · 7 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. kind/support Categorizes issue or PR as a support question.

Comments

@zehuaiWANG
Copy link

hey, guys, I have a problem and wonder if anyone here could help me. I installed a minikube in my server, and I create a pod with clusterFirst dns, but when I curl domain name in the container, it will timeout and then failed. However, it can curl successfully in the server.

# minikube version
minikube version: v1.9.2

here is my coredns configmap:

apiVersion: v1
data:
  Corefile: |
    .:53 {
        errors
        health {
           lameduck 5s
        }
        ready
        kubernetes cluster.local in-addr.arpa ip6.arpa {
           pods insecure
           fallthrough in-addr.arpa ip6.arpa
           ttl 30
        }
        prometheus :9153
        forward . /etc/resolv.conf
        cache 30
        loop
        reload
        loadbalance
    }
kind: ConfigMap
metadata:
  creationTimestamp: "2020-04-08T03:21:00Z"
  managedFields:
  - apiVersion: v1
    fieldsType: FieldsV1
    fieldsV1:
      f:data: {}
    manager: kubeadm
    operation: Update
    time: "2020-04-08T03:21:00Z"
  - apiVersion: v1
    fieldsType: FieldsV1
    fieldsV1:
      f:data:
        f:Corefile: {}
    manager: kubectl
    operation: Update
    time: "2020-04-08T08:51:01Z"
  name: coredns
  namespace: kube-system
  resourceVersion: "57049"
  selfLink: /api/v1/namespaces/kube-system/configmaps/coredns
  uid: 7379d8e2-b332-404e-9a40-9d1ec920151f
@zehuaiWANG
Copy link
Author

/assign @medyagh

@medyagh
Copy link
Member

medyagh commented Apr 8, 2020

can u plz probide your start args and your versions and os
and also which container run time?

and also provide me what u expect to see and what error do u get?

@priyawadhwa priyawadhwa added kind/bug Categorizes issue or PR as related to a bug. kind/support Categorizes issue or PR as a support question. labels Apr 8, 2020
@aasmall
Copy link

aasmall commented May 9, 2020

try the patch command here: #8055

@priyawadhwa
Copy link

Hey @zehuaiWANG are you still seeing this issue? Did the patch work for you?

@zehuaiWANG
Copy link
Author

I have solved the problem. The reason for this problem is that my host has env settings and can access some external addresses, but there is no such env setting in minikube, so the same URL can be accessed on the host and minihub can't. Thank you, and I think we can close this issue. @priyawadhwa @aasmall @medyagh

@priyawadhwa
Copy link

@zehuaiWANG great to hear!

@srvmsr
Copy link

srvmsr commented Jul 27, 2020

Also in some cases , you can edit your core dns conf file to point to a public dns instead of local resolve.conf and restart core dns pods
a example core dns conf file

{
"Corefile": ".:53 {
errors
log
health {
lameduck 5s
}
ready
kubernetes cluster.local in-addr.arpa ip6.arpa {
pods insecure
fallthrough in-addr.arpa ip6.arpa
ttl 30
}
prometheus :9153
loop
reload
loadbalance
forward . 8.8.8.8 8.8.4.4
}
"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. kind/support Categorizes issue or PR as a support question.
Projects
None yet
Development

No branches or pull requests

5 participants