How can I trigger a Kubernetes Scheduled Job manually?

前端 未结 7 538
抹茶落季
抹茶落季 2020-12-07 13:43

I\'ve created a Kubernetes Scheduled Job, which runs twice a day according to its schedule. However, I would like to trigger it manually for testing purposes. How can I do t

7条回答
  •  再見小時候
    2020-12-07 14:02

    The issue #47538 that @jdf mentioned is now closed and this is now possible. The original implementation can be found here but the syntax has changed.

    With kubectl v1.10.1+ the command is:

    kubectl create job --from=cronjob/

    It seems to be backwardly compatible with older clusters as it worked for me on v0.8.x.

提交回复
热议问题