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?
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.