7
有人有過運行計劃任務的經驗嗎?由於guide,因爲1.4啓用運行批/ v2alpha1可用ScheduledJobsGoogle Container Engine上的ScheduledJobs(kubernetes)
所以我用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
該功能可能還沒有實現?或者我在模板創建過程中犯了一些錯誤?
預先感謝您。
'kubectl version' reports server 1.4.5 and client 1.4.4 installed –