0

I'm trying to understand why I do not have the same behavior on Kubedns with kube-system and another namespace.

For example, with this kind of pod:

apiVersion: v1
kind: Pod
metadata:
  name: debian
  namespace: kube-system
spec:
  containers:
  - image: debian
    command:
      - sleep
      - "3600"
    imagePullPolicy: IfNotPresent
    name: busybox
  restartPolicy: Always

If I'm trying to reach dns service with this pod on kube-system namespace, it fails. However, if I'm using another namespace, it works.

Of course I'm trying to target a service name in the same namespace that the pod.

Any idea why it fails on kube-system?

Deimosfr
  • 101
  • 1
  • 3

1 Answers1

0

I tested on both name space, it works on both name space. can you give some more details on your issue?

in kube-system namespace

 dig @kube-dns.kube-system.svc.cluster.local +short NS google.com
ns1.google.com.
ns2.google.com.
ns4.google.com.
ns3.google.com.

in default namespace.

 dig @kube-dns.kube-system.svc.cluster.local +short NS google.com
ns2.google.com.
ns1.google.com.
ns4.google.com.
ns3.google.com.
sfgroups
  • 18,151
  • 28
  • 132
  • 204
  • On the kube-system namespace, I've got: ";; connection timed out; no servers could be reached". And on another namespace: it works. It may be a configuration issue (but I don't really think) or a routing/firewall issue. To get an idea of what my Kubedns configuration looks like: https://github.com/deimosfr/ansible-coreos-kubernetes/blob/master/defaults/main.yml#L346 – Deimosfr Aug 07 '17 at 05:25