I want to create a container with the command line arguments --lines 56 -F .
option: For this purpose I ran the command =>
k run app --image=lfccncf/arg-output --dry-run=client -o yaml > pod9.yamlapiVersion: v1 kind: Pod metadata: labels: run: app name: app spec: containers: - image: lfccncf/arg-output name: app args: ["--lines","56","F"]option: Here is the second option how to accomplish the task.
kubectl run app1 --image=lfccncf/arg-output --dry-run=client --command ["--lines 56 -F"] -o yaml > pod9.yaml
I have this restriction "When creating your pod you do not need to specify a container command, only args". Which option is correct with the mentioned restriction?
Number 1 since you are saying that you don't need to specify the command and that assumes it's already pre-baked into the container image.
--lines 56 -Fare arguments and not 'the command'Quoted from the docs:
A similar working approach would be: