I'm trying to run a cmd to create cronjob:
"k create cronjob mycron --image:httpd --schedule="*/8 * * * *" --name=mycontainer-name"
but it does not recognize, i tried to use flag "--container-name=mycontainer-name" but not working too.
is there way to do 1 liner and specify container name in it? or the only way is to use declarative like
"k create cronjob mycron --image:httpd --schedule="*/8 * * * *" --dry-run=client -oyaml > d.yaml"
and then change it in yaml file and run apply?
I don't think CLI supports any Options to name container. You can check kubectl create cronjob --help for all the available options. kubectl apply seems to be the only possible way.