Kubespray: How to enable CronJob?

Created on 31 Jul 2017  路  1Comment  路  Source: kubernetes-sigs/kubespray

I'm trying to create cronjob and got a message:

error: error validating "my_app.yaml": error validating data: couldn't find type: v2alpha1.CronJob; if you choose to ignore these errors, turn validation off with --validate=false

How to enable batch/v2alpha1?

Versions:

% kubectl version
Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.1", GitCommit:"1dc5c66f5dd61da08412a74221ecc79208c2165b", GitTreeState:"clean", BuildDate:"2017-07-14T05:22:03Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.7+coreos.0", GitCommit:"c8c505ee26ac3ab4d1dff506c46bc5538bc66733", GitTreeState:"clean", BuildDate:"2017-07-06T17:38:33Z", GoVersion:"go1.7.6", Compiler:"gc", Platform:"linux/amd64"}

Most helpful comment

Found solution:

in /etc/kubernetes/manifests/kube-apiserver.manifest, add section spec.containers[].command

- --runtime-config=batch/v2alpha1=true

Then reboot server

>All comments

Found solution:

in /etc/kubernetes/manifests/kube-apiserver.manifest, add section spec.containers[].command

- --runtime-config=batch/v2alpha1=true

Then reboot server

Was this page helpful?
0 / 5 - 0 ratings