Kubectl exec -ti pod1 -- netstat service1 does not work

kubectl exec -ti pod1 – nslookup service1 does not work to inspect network from pod to service

Hello, @sajints
Can you please share more details? like
What image are you using for the pod?
Does it have that package pre-installed?
Did you try with fqdn for service?

regards,

@Tej_Singh_Rana Hello, i was using nginx image, about fqdn and ip address, already tried those:

root@controlplane:~# k exec -it test – nslookup test-service.default.svc.cluster.local
nslookup: can’t resolve ‘(null)’: Name does not resolve

Name: test-service.default.svc.cluster.local
Address 1: 10.105.208.9 test-service.default.svc.cluster.local

For testing connectivity from pod to service, i can use this command, right? Is there anyother better command?