Trigger RUN NOW using kubectl

8/31/2021

With GCP, you can click the RUN NOW button on a CronJob's page and the generated pod will be visible under the Managed Pods section on that same page. How can I do the same using the kubectl CLI?

I tried the command kubectl create job ... but it creates a completely separate Job and it's not connected to the CronJob.

-- kbariotis
google-cloud-platform
google-kubernetes-engine
kubernetes

1 Answer

9/1/2021

kubectl create job --from=cronjob/${NAME_OF_EXISTING_CRONJOB} ${JOB_NAME}

-- Gari Singh
Source: StackOverflow