Is it possible to pass arguments to kubernetes cron job when invoking it manually?

11/3/2020

I know you can run a K8 cron job manually via

kubectl create job --from

But I wonder if one can pass arguments as well?

-- epitka
kubernetes

1 Answer

11/3/2020

Is this what you are looking for ?

  # Create a job
  kubectl create job my-job --image=busybox

  # Create a job with command
  kubectl create job my-job --image=busybox -- date

  # Create a job from a CronJob named "a-cronjob"
  kubectl create job test-job --from=cronjob/a-cronjob
-- confused genius
Source: StackOverflow