One generic question... when they label the deployment ... should you change the . . .

Laslo Pastor:
one generic question… when they label the deployment … should you change the labels for rs and pods? … I mean replica set selector need to match to pods label but
Im asking because when you doing imperative deploy command you cannot set label so rs and pod will take deployment name by default … or I missing something ?!?

Ninad Desai:
during imperative command as well you can set label … by passing paramater –label=abc=def

Laslo Pastor:
but I can do it only on pod level … so I need to use k run command, and not k create deploy .

But IMO is best to do with run and define replicas in that case it will create deployment with proper labeling

Tej_Singh_Rana:
> But IMO is best to do with run and define replicas in that case it will create deployment with proper labeling
kubectl run will create a pod not deployment. To create a deployment, you have to run the kubectl create deployment command. You can add --replicas flag also.

kubectl create deployment <deploy-name> --image=<image-name> --replicas=<count>

Tej_Singh_Rana:
> Im asking because when you doing imperative deploy command you cannot set label so rs and pod will take deployment name by default
Yes, you understood correctly. If you wanna define your own labels then copy into a file and edit it.