What exceptions can be raised by `load_kube_config`?

4/9/2020

My team is using the Python3 kubernetes package in some of our code. What are the exceptions that can be raised by a call to kubernetes.config.load_kube_config?

-- DeepDeadpool
kubernetes
python-3.x

1 Answer

4/9/2020

On top of the standard errors that can be raised at any point (MemoryError, OSError, KeyboardInterrupt, etc), it mostly uses its own ConfigException class. Just go read the code for yourself https://github.com/kubernetes-client/python-base/blob/master/config/kube_config.py

-- coderanger
Source: StackOverflow