I am a little confused about the solution to this question in Mock exam2: My ans . . .

Brijesh Jaggi:
I am a little confused about the solution to this question in Mock exam2:
My answer was different , which was rejected.

solution video answer is
isnt this the way to create pods, when i run it creats pods and not deployments
image.png

Fernando Jimenez:
Hi @Brijesh Jaggi kubectl run doesn’t have a --replicas or --record parameters

Fernando Jimenez:

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

Fernando Jimenez:
A deployment does

Fernando Jimenez:
–replicas=1 is the default for it so it is not necessary

Mohamed Ayman:
It’s an issue with kubernetes 1.19. As a workaround you can do:
kubectl create deployment nginx-deploy --image=nginx:1.16 --replicas=1 -o yaml > nginx.yaml

kubectl create -f nginx.yaml --record

Brijesh Jaggi:
thank you guys, this is a great tip

kubectl create -f nginx.yaml --record

Bryan Tanoue:
Ferando helped my yesterday on almost the exact same question.