Hi, I'm trying the --record flag during the create deployment any idea why this . . .

vuppuluri sriramsubhash:
Hi, I’m trying the --record flag during the create deployment any idea why this is not working

Kubectl create deployment random --image=nginx --replicas=2 --record

Andrey Dudin:
What is a --record ?

Andrey Dudin:
where you find it?

Tharanath:
I think it is only possible to record while changing the resource and not during creation. Append the --record flag to save the kubectl command that is making changes to the resource.

Tharanath:
https://kubernetes.io/docs/concepts/workloads/controllers/deployment/

vuppuluri sriramsubhash:
I was looking in the solution for mock test 2 where it was working fine … Is it possible that its usage changed now …?

unnivkn:
kubectl create deployment won’t support --record. Below are the few options that you can use:

k create deployment random --image=nginx --replicas=2 --dry-run=client -o yaml > 1.yaml
k apply -f 1.yaml --record

k set image deployment web1 nginx=nginx:latest --record
k rollout undo deployment/web1 --record
k -n default edit deployment web1 --record

vuppuluri sriramsubhash:
Understood thanks @unnivkn