<p>I want get image name and pods status of Replica Set name by <a href="https://pypi.org/project/kubernetes/" rel="nofollow noreferrer">python k8s SDK</a></p>
<p>Currently  I get the data manually from k8s UI dashboard:
<a href="https://i.stack.imgur.com/G5qVJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/G5qVJ.png" alt="enter image description here" /></a></p>
<p>I write code for get service (Replica Set) data but I didn't find any information of images or pods status of the service</p>
<pre><code>config.load_kube_config()
api_instance = client.CoreV1Api()
services_items = api_instance.list_namespaced_service(namespace=namespace).items
</code></pre>

Aviv Monika
<p><code>Deployment</code>, <code>ReplicaSet</code>, etc, belong to the <code>apps/v1</code> API, not to the core API:</p>
<pre class="lang-py prettyprint-override"><code>from kubernetes import client, config
config.load_kube_config()
api = client.AppsV1Api()

deployment_list = api.list_namespaced_deployment(namespace=&quot;foo&quot;)
# status of the first deployment in the list
print(deployment_list.items[0].status)

rs_list = api.list_namespaced_replica_set(namespace=&quot;bar&quot;)
# image of the first container of the first replica set in the list
print(rs_list.items[0].spec.template.spec.containers[0].image)
</code></pre>
