<p>what is python kubernetes client equivalent for</p>
<pre><code>kubectl get deploy -o yaml 
</code></pre>
<p><a href="https://github.com/kubernetes-client/python/blob/master/examples/deployment_crud.py" rel="noreferrer">CRUD python Client example</a></p>
<p>i referred this example for getting python deployment
but there is no read deployment option</p>

<p><code>read_namespaced_deployment()</code> does the thing:</p>
<pre class="lang-py prettyprint-override"><code>from kubernetes import client, config
config.load_kube_config()
api = client.AppsV1Api()

deployment = api.read_namespaced_deployment(name='foo', namespace='bar')
</code></pre>
