I have Kuberenets cluster with AWS-EKS, Suddenly on my cluster existing pods were unable to resolve DNS host name when i try to check NSLookup internally in pods. Can someone please suggest me like 1. How to resolve this DNS resolution among pods 2. What change causes my cluster to go like this all of sudden
Chek youre namespaces. The kube-dns works in the following way:
get pod in the same namespace: curl http://servicename
get pod in a different namespace: curl http://servicename.namespace
Here and here Understanding namespaces and DNS When you create a Service, it creates a corresponding DNS entry. This entry is of the form ..svc.cluster.local, which means that if a container just uses it will resolve to the service which is local to a namespace. This is useful for using the same configuration across multiple namespaces such as Development, Staging and Production. If you want to reach across namespaces, you need to use the fully qualified domain name (FQDN).