Exposing service and pod

I exposed a deployment named nginx-expose with svc named nginx-exposed. Then using a busybox pod I am trying to nslookup the pod and svc but I get below error:

:~ (master-booster-274901)$ k exec -it busybox – nslookup nginx-expose.default.svc.cluster.local
Server: 10.8.0.10
Address: 10.8.0.10:53
Name: nginx-expose.default.svc.cluster.local
Address: 10.8.2.158
*** Can’t find nginx-expose.default.svc.cluster.local: No answer

:~ (master-booster-274901)$ k exec -it busybox – nslookup 10-4-1-120.default.pod.cluster.local
Server: 10.8.0.10
Address: 10.8.0.10:53
Name: 10-4-1-120.default.pod.cluster.local
Address: 10.4.1.120
*** Can’t find 10-4-1-120.default.pod.cluster.local: No answer

Can anyone please provide support on this?

Hello agrawalgargieic,

It’s not a Kubernetes level networking issue, the DNS inside busybox does not work properly, you can try busybox images <= 1.28.4