In the mock test 2 Ques: 5 How to create a deployment with --record? In the an . . .

Ankit Arora:
In the mock test 2 Ques: 5

How to create a deployment with --record?

In the answer video, he is creating a run command to create a deployment but when I used the same command k run nginx-deploy --image=nginx:1.16 --replicas=1 --record , it only creates a pod.

Marco Tony:
k create deploy...

George Lazaroff:

kubectl create deploy nginx-deploy --image=nginx:1.16 --replicas=1

kubectl set image deploy nginx-deploy nginx=nginx:1.17 --record 

kubectl rollout history deploy nginx-deploy

Ankit Arora:
They should fix the answer videos as well.

George Lazaroff:
image is fixed 1.17 :)sry

Ankit Arora:
Thanks @George Lazaroff

Ankit Arora:
@George Lazaroff Can you please help me with question number 7 as well?

I am using the following command to check nslookup but getting timed out.

k run --generator=run-pod/v1 busybox1 --image busybox:1.28 --rm -it -- nslookup nginx-resolver-service

George Lazaroff:
whats the question ?

George Lazaroff:
i dont remember it, i passed but …

George Lazaroff:

kubectl run busybox1 --image=busybox:1.28 --rm -it -- nslookup nginx-resolver-service.<namespace>.svc > <file name>

Ankit Arora:
Ques:

Create an 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

George Lazaroff:
into which namespace are located the service and pod

George Lazaroff:

kubectl get pod, svc --all-namespace

kubectl run busybox1 --image=busybox:1.28 --rm -it -- nslookup nginx-resolver-service.default.svc > /root/CKA/nginx.svc

kubectl get pod -o wide | grep nginx-resolver

check and take the IP - 10.10.1.2 its only example

kubectl run busybox1 --image=busybox:1.28 --rm -it -- nslookup 10-10-1-2.default.pod > /root/CKA/nginx.pod

George Lazaroff:
verify the commands before to redirect them to the file

or check the files

cat /root/CKA/nginx.pod
cat /root/CKA/nginx.svc