Looking to use the Kubernetes client for Python. After following these directions, I completed first steps and used the sample script.
git clone --recursive https://github.com/kubernetes-client/python.git
cd python
python setup.py install
I use the sample code to test on a minikube cluster and I receive this error. I have not seen a path forward but curious if anyone has suggestions on how to move past it.
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))
Once I run the script I receive a google.auth error. I try to add in the package to the script and same result.
import google.auth
ModuleNotFoundError: No module named 'google.auth'