<p>When I want to run the demo, I get the error:</p>

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

<p>Then I found:</p>

<blockquote>
  <p>Prerequisites You need a working Kubernetes cluster at version >= 1.4
  (for ScheduledJob), >= 1.5 (for CronJob), with batch/v2alpha1 API
  turned on by passing --runtime-config=batch/v2alpha1=true while
  bringing up the API server (see Turn on or off an API version for your
  cluster for more).</p>
</blockquote>

<p>The above conditions need to do <code>--runtime-config=batch/v2alpha1=true</code>, but I don't know where and how to execute it</p>

<p>Here is it documented. <a href="https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/</a> we need to enable this feature in API server.</p>

<p>on the master server you need to add the line command section in this file <code>/etc/kubernetes/manifests/kube-apiserver.yaml</code>. then restart whole cluster.</p>

<p>After restart check the api version. we should see the feature enabled.</p>

<pre><code>kubectl api-versions |grep batch
batch/v1
batch/v2alpha1
</code></pre>
