Python client for the kubernetes API.
From source:
git clone https://github.com/aitbrahim/k8s_client
python setup.py install
list all pods:
client = CoreV1Api()
print("Listing pods for all namespace :")
resp = client.list_pods()
for i in resp.get('items'):
try:
print("%s\t%s\t%s" %
(i['status']['podIP'], i['metadata']['namespace'], i['metadata']['name']))
except KeyError:
continue