<p>I am trying to use the K8S python client to create a bunch of cronjobs on my cluster. I can't seem to find a <code>create_from_yaml</code> for cornjobs or any resources other than deployments for that matter. What I want to do is:</p>

<pre><code>from kubernetes import client, utils

batchv1beta1 = client.BatchV1beta1Api()
utils.create_from_yaml(batchv1beta1, 'jobs/job-01.yaml')
</code></pre>

<p>But this doesn't work obviously since this is not a valid attribute. Any guidance is appreciated!</p>

cookiedough
<p>Actually, <code>utils.create_from_yaml</code> supports any Kubernetes objects. This should work: </p>

<pre class="lang-py prettyprint-override"><code>from kubernetes import client, utils 

k8s_client = client.ApiClient() 
utils.create_from_yaml(k8s_client, 'jobs/job-01.yaml') 
</code></pre>
