saranga baruah:
Hi All, I was working on Mock up test-2 Question# 7.
Ran the below command
“kubectl run test-nslook --image=busybox:1.28 --rm -it – nslookup 10-50-192-4.default.pod > /root/CKA/nginx.pod” (10-50-192-4= nginx-resolver pod IP). Got below error:
“error: timed out waiting for the condition” What could be wrong here?
Status of the nginx-resolver is Running and also I was able to do nslookup of the service successfully.
saranga baruah:
The question for ready reference is
"Create a nginx pod called nginx-resolver
using image nginx
, expose it internally with a service called nginx-resolver-service
. Test that you are able to look up the service and pod names from within the cluster. Use the image: busybox:1.28
for dns lookup. Record results in /root/CKA/nginx.svc
and /root/CKA/nginx.pod"
Vitor Jr.:
I see two possibilities: 1. Pod name was wrong, or 2. Service wasn’t created the way it was supposed to.
unnivkn:
Hi @saranga baruah please try this:
unnivkn:
kubectl run test-nslookup-1 --image=busybox:1.28 --rm --restart=Never -it – nslookup nginx-resolver-service
kubectl run test-nslookup-2 --image=busybox:1.28 --rm --restart=Never -it – nslookup 10-32-0-5.default.pod
unnivkn:
yup… please try it …