I have gone through the doc mentioned here gitlink as well as doclink
But my job would be a whole lot easier if I could get the dns of a resource type by using any kubernetes command. Also tried this commands-link
For example, i would like to get the dns name of a service db-service running in dev namespace inside svc.cluster.local
db-service.dev.svc.cluster.local
Any pointers ?
If you need to, you can query that in a pod:
How do I run a container from the command line in Kubernetes (like docker run)?
Retrieve the full name of a service in Kubernetes
using a pod which has some DNS utils
you can then run
for a one-liner, see: https://serverfault.com/questions/929211/kubernetes-pod-dns-resolution