I'm using kubernetes python client library to list all ingresses in a namespace. I'm using the api NetworkingV1Api(). When i run the code, its throwing the error "AttributeError: 'NetworkingV1Api' object has no attribute 'list_namespaced_ingress'"
from kubernetes import client, config
config.load_kube_config(config_file=os.environ.get("KUBECONFIG",'my-cluster.config'),context=os.environ.get("KUBECONTEXT"))
v1=client.NetworkingV1Api()
ingress_list=v1.list_namespaced_ingress(namespace=ns1)
print(ingress_list)
Can someone please help on this issue. I'm able to execute other api resources using this client.
I'have tried with ExtensionsV1beta1Api() and CoreV1Api(), but still no luck.