CronJob をその場で Job を作って実行する方法 ref: https://qiita.com/koudaiii/items/586a8a0e0f763ddf9a05
$ kubectl create job -h | |
Create a job with the specified name. | |
Examples: | |
# Create a job from a CronJob named "a-cronjob" | |
kubectl create job test-job --from=cronjob/a-cronjob | |
Options: | |
--allow-missing-template-keys=true: If true, ignore any errors in templates when a field or map key is missing in | |
the template. Only applies to golang and jsonpath output formats. | |
--dry-run=false: If true, only print the object that would be sent, without sending it. | |
--from='': The name of the resource to create a Job from (only cronjob is supported). | |
-o, --output='': Output format. One of: | |
json|yaml|name|go-template-file|templatefile|template|go-template|jsonpath-file|jsonpath. | |
--save-config=false: If true, the configuration of current object will be saved in its annotation. Otherwise, the | |
annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future. | |
--template='': Template string or path to template file to use when -o=go-template, -o=go-template-file. The | |
template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. | |
--validate=true: If true, use a schema to validate the input before sending it | |
Usage: | |
kubectl create job NAME [--from=CRONJOB] [flags] [options] | |
Use "kubectl options" for a list of global command-line options (applies to all commands). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment