所以我需要通过一个pod连接到python kubernetes客户端。我一直在尝试使用config.load_incluster_config()
,基本上是按照这里的例子。但是它抛出了这些错误。
File "/Users/myname/Library/Python/2.7/lib/python/site-packages/kubernetes/config/incluster_config.py", line 93, in load_incluster_config
cert_filename=SERVICE_CERT_FILENAME).load_and_set()
File "/Users/myname/Library/Python/2.7/lib/python/site- packages/kubernetes/config/incluster_config.py", line 45, in load_and_set
self._load_config()
File "/Users/myname/Library/Python/2.7/lib/python/site-packages/kubernetes/config/incluster_config.py", line 51, in _load_config
raise ConfigException("Service host/port is not set.")
我正在使用 Python 2.7 和 Minikube 任何提示或建议将不胜感激。谢谢你。