You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are overwriting KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT because we need pyos to reach the API servers directly, since after applying some network policies, the default namespace service cannot be reached.
What is it failing still why it still tries to use kubernetes.default.svc instead ?
if KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT are defined then pyos loads the incluster config else it loads kube config.
if os.getenv('KUBERNETES_SERVICE_HOST') and os.getenv('KUBERNETES_SERVICE_PORT') :
config.load_incluster_config() # set up the client from within a k8s pod
else:
config.load_kube_config()
This could be the source of this issue, could you try to unset KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT and use kube config.
We are overwriting
KUBERNETES_SERVICE_HOST
andKUBERNETES_SERVICE_PORT
because we need pyos to reach the API servers directly, since after applying some network policies, the default namespace service cannot be reached.What is it failing still why it still tries to use kubernetes.default.svc instead ?
The text was updated successfully, but these errors were encountered: