mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00
11 lines
358 B
Python
11 lines
358 B
Python
![]() |
from kubernetes import client, config
|
||
|
|
||
|
# Configs can be set in Configuration class directly or using helper utility
|
||
|
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))
|