<p>I'm trying to update the subresource &quot;status&quot; of a crd resource with the python kubernetes client. The customresourceapi does not seem to provide functionality for this. Any ideas?</p>

Julian Re
<p>You can use the <code>CustomObjectsApi</code> to update the status using <code>patch</code> method.</p>
<p><strong>Code:</strong></p>
<pre class="lang-py prettyprint-override"><code>from kubernetes import client


api = client.CustomObjectsApi()
api.patch_namespaced_custom_object_status(
    name='sample-cron-tab',
    group='stable.example.com',
    version='v1',
    namespace='default',
    plural='crontabs',
    body={'status': {'replicas': 2}}
)
</code></pre>
<p>Above code will work if you are using custom resources that are namespace scoped.</p>
<p>If you are using cluster scope, try below code</p>
<pre><code>api.patch_cluster_custom_object_status(
    name='sample-cron-tab',
    group='stable.example.com',
    version='v1',
    plural='crontabs',
    body={'status': {'replicas': 2}}
)
</code></pre>
