Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
def test_to_list_all_namespaces(k8s_client):
ret = k8s_client.list_namespace()
nscount = len(ret.items)
assert(nscount > 0)
# Iterate through all the namespaces in the K8s cluster and list it down
for item in ret.items:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment