有人有运行预定工作的经验吗?由于该指南,ScheduledJobs 从 1.4 开始可用,并启用了运行时批处理/v2alpha1
所以我得到了kubectl api-versions
命令:
autoscaling/v1
batch/v1
batch/v2alpha1
extensions/v1beta1
storage.k8s.io/v1beta1
v1
但是当我用命令尝试下面的示例模板时kubectl apply -f job.yaml
apiVersion: batch/v2alpha1
kind: ScheduledJob
metadata:
name: hello
spec:
schedule: 0/1 * * * ?
jobTemplate:
spec:
template:
spec:
containers:
- name: hello
image: busybox
args:
- /bin/sh
- -c
- date; echo Hello from the Kubernetes cluster
restartPolicy: OnFailure
我有错误
error validating "job.yaml": error validating data: couldn't find type: v2alpha1.ScheduledJob; if you choose to ignore these errors, turn validation off with --validate=false
有可能该功能仍未实现吗?或者我在模板创建过程中犯了一些错误?
先感谢您。