Unable to resolve kubernetes.default

When trying nslookup inside vault pod running in minikube kubernetes cluster, it’s unable to reslove kubernetes.default.

nslookup kubernetes.default
Server:         10.96.0.10
Address:        10.96.0.10:53

Non-authoritative answer:
Name:   kubernetes.default
Address: 127.0.0.1

Non-authoritative answer:
*** Can't find kubernetes.default: No answer

What changes needs to be done so that vault is able to recognise this?

This is perfectly normal, and not specific to Vault pods.

As a DNS debugging tool, nslookup directly sends the queries you ask it to - it does not use the search suffix list configured in /etc/resolv.conf, as most other name lookups performed via higher layer tools do.

Try resolving the name with ping or getent hosts instead.

Even the ping is not working as expected. All other pods such as busy box are able to resolve it which are running in the same namespace as that of vault, then why vault is unable to ?