diff --git a/binderhub/resources.py b/binderhub/resources.py index 257ec7ce8..1015d57e0 100644 --- a/binderhub/resources.py +++ b/binderhub/resources.py @@ -14,7 +14,8 @@ class ResourcesHandler(BaseHandler,LoggingConfigurable): try: kubernetes.config.load_incluster_config() except kubernetes.config.ConfigException: - kubernetes.config.load_kube_config() + #kubernetes.config.load_kube_config() + print("load incluster config exception") api = client.CoreV1Api() def generate_avail(self): diff --git a/binderhub/spawner_config.py b/binderhub/spawner_config.py index 5e888fa9b..744692fb3 100644 --- a/binderhub/spawner_config.py +++ b/binderhub/spawner_config.py @@ -17,7 +17,8 @@ class SpawnerConfigHandler(BaseHandler): try: kubernetes.config.load_incluster_config() except kubernetes.config.ConfigException: - kubernetes.config.load_kube_config() + #kubernetes.config.load_kube_config() + print("load incluster config exception") api = client.CoreV1Api() secrets = api.list_namespaced_secret("binderhub") secret = next(s for s in secrets.items if s.metadata.name == "binderhub-values")