Hi, I have one question for you. Command is: kubectl run busybox --image=busybox . . .

H4:
Hi, I have one question for you. Command is: kubectl run busybox --image=busybox --restart=Never --rm -it – env > envpod.yaml -> My question is. What does " – " mean ?

Michael Cuffaro:
This should help you:

https://unix.stackexchange.com/a/11382

Michael Cuffaro:
My question to you is, what are you trying to achieve with the command you listed?

Michael Cuffaro:
like can you translate what that command does?

H4:
This is an example as command with two dashes :wink:

Michael Cuffaro:
haha, ok fair enough.
What do you think it does?

H4:
It means the end of -it ? It separate ‘env’ from -it ? ( im my example :wink: ) and now it is not parametr for -it ? Right ?

Tej_Singh_Rana:
Hello, @H4
In terms of k8s, after double dash (–) what ever you will write in that section counted as command for Pod’s container.

$ kubectl run test --image=busybox -- date
pod/test created
$ kubectl get po
NAME   READY   STATUS      RESTARTS   AGE
test   0/1     Completed   0          4s
$ kubectl logs test
Fri Dec  4 05:52:54 UTC 2020

Above short example will give you an overview of double dash uses.

Tej_Singh_Rana:
So make sure whatever you wanna add flags with kubectl command, should be before double dash (–).
Hope it helps you to understand.