Hi Guys, In Mock Exam -2 - Question -7 .... nslookup doesn't not work.. it gets . . .

Roshan Ranasinghe:
Hi Guys, In Mock Exam -2 - Question -7 … nslookup doesn’t not work… it gets stuck Could you pls help me?

cmd :
kubectl run test-nslookup --image=busybox:1.28 --rm -it – nslookup nginx-resolver-service

AB:
its create a pod. you need to write it like
kubectl run test-nslookup --image=busybox:1.27 --restart=Never --rm -it --nslookup nginx-resolver-service

sarath s:
This how i did:

sarath s:
create pod

sarath s:

apiVersion: v1
kind: Pod
metadata:
  name: busybox
  namespace: default
spec:
  containers:
  - name: busybox
    image: busybox:1.28
    command:
      - sleep
      - "3600"
    imagePullPolicy: IfNotPresent
  restartPolicy: Always

sarath s:

kubectl exec -ti busybox -- nslookup nginx-resolver-service.default

Roshan Ranasinghe:
Thanks @AB and @sarath s… AB 's answer worked

PP:
@Roshan Ranasinghe Please include *–restart=Never" it will work.

Roshan Ranasinghe:
ok … got it Thanks @PP