From 3d730a0e9c7555fd7897bea70d21e2a11719b377 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 14 Jun 2021 19:40:24 +0200 Subject: [PATCH] +python test --- python/test.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 python/test.py diff --git a/python/test.py b/python/test.py new file mode 100644 index 0000000..1bd28fb --- /dev/null +++ b/python/test.py @@ -0,0 +1,9 @@ +from kubernetes import client, config + +config.load_kube_config() + +v1=client.CoreV1Api() +print("Listing pods with their IPs:") +ret = v1.list_pod_for_all_namespaces(watch=False) +for i in ret.items: + print("%s\t%s\t%s" % (i.status.pod_ip, i.metadata.namespace, i.metadata.name))