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 ?
This should help you:
My question to you is, what are you trying to achieve with the command you listed?
like can you translate what that command does?
This is an example as command with two dashes
haha, ok fair enough.
What do you think it does?
It means the end of -it ? It separate ‘env’ from -it ? ( im my example ) and now it is not parametr for -it ? Right ?
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.
So make sure whatever you wanna add flags with
kubectl command, should be before double dash (–).
Hope it helps you to understand.