Not able to nslookup a pod

kubectl run nginx --image=nginx

##########

kubectl expose pod nginx --name=nginx-svc --port 8080 --target-port 8080

########

kubectl run busybox --image=busybox:1.28 -it – nslookup nginx-svc :heavy_check_mark:
#############
kubectl run busybox --image=busybox:1.28 -it – nslookup {podip(10-9-2-10.default.pod} :x:

here i’m not able to nslookup in this
pls help and correct me whre im wrong

Hello, @Bhupender
Please check solution number 7. here

Thankyou @Tej-Singh-Rana when i try this command exclude --restart=Never it dosen’t work

@Bhupender , you need to use --restart=Never or else the busybox container will get exited.