Closed jackovsky8 closed 6 months ago
This issue is currently awaiting triage.
SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the triage/accepted
label.
The triage/accepted
label can be added by org members by writing /triage accepted
in a comment.
/close This is a duplicate of https://github.com/kubernetes/kubectl/issues/1206 which was closed. To expand on the response there we do not intend to expand the functionality of imperative commands in kubectl, create being one such command. The recommended path forward is to duplicate the yaml for the existing job, and use kubectl apply to create the new job.
@mpuckett159: Closing this issue.
What would you like to be added: When you run the command: kubectl create job --from=cronjob/mycronjob -- bar You receive the following error: error: cannot specify --from and command
It would be useful to modify the command for the job here.
Why is this needed: This would be a very handy feature. E.g. you have a cron job with a lot of options, config maps, secrets, PVCs etc, and you want to run this underlying command with another parameter.
It could be used for all kinds of purposes, like maybe to activate a debug log in the underlying tool, or to run tests or the cron job only covers 90 percent of the usage and the rest is done manually.
The only option to achieve this now, is to get the job template with another tool, modify it and create a job with the modified config.
But I don't think it's such a rare requirement.