I received this error when trying to launch jupyterhub on a kubernetes cluster with the latest release kubespawner==0.10.1 and kubernetes==10.0.
Looks like they made changes to the beta kubernetes python API.
There are two workarounds:
Roll back to kubernetes==9.0
Install the latest kubespawner commit from github, e.g., pip install git+https://github.com/jupyterhub/kubespawner.git
[E 2019-08-02 22:27:22.848 JupyterHub app:2482]
Traceback (most recent call last):
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/app.py", line 2479, in launch_instance_async
await self.initialize(argv)
File "/opt/conda/lib/python3.6/site-packages/jupyterhub/app.py", line 2088, in initialize
self.load_config_file(self.config_file)
File "</opt/conda/lib/python3.6/site-packages/decorator.py:decorator-gen-5>", line 2, in load_config_file
File "/opt/conda/lib/python3.6/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/opt/conda/lib/python3.6/site-packages/traitlets/config/application.py", line 598, in load_config_file
raise_config_file_errors=self.raise_config_file_errors,
File "/opt/conda/lib/python3.6/site-packages/traitlets/config/application.py", line 562, in _load_config_files
config = loader.load_config()
File "/opt/conda/lib/python3.6/site-packages/traitlets/config/loader.py", line 457, in load_config
self._read_file_as_dict()
File "/opt/conda/lib/python3.6/site-packages/traitlets/config/loader.py", line 489, in _read_file_as_dict
py3compat.execfile(conf_filename, namespace)
File "/opt/conda/lib/python3.6/site-packages/ipython_genutils/py3compat.py", line 198, in execfile
exec(compiler(f.read(), fname, 'exec'), glob, loc)
File "/srv/brixauthenticator/jupyterhub_config.py", line 8, in <module>
import kubespawner
File "/opt/conda/lib/python3.6/site-packages/kubespawner/__init__.py", line 15, in <module>
from kubespawner.spawner import KubeSpawner
File "/opt/conda/lib/python3.6/site-packages/kubespawner/spawner.py", line 40, in <module>
from kubespawner.objects import make_pod, make_pvc
File "/opt/conda/lib/python3.6/site-packages/kubespawner/objects.py", line 11, in <module>
from kubernetes.client.models import (
ImportError: cannot import name 'V1beta1Ingress'
I received this error when trying to launch jupyterhub on a kubernetes cluster with the latest release
kubespawner==0.10.1
andkubernetes==10.0
.Looks like they made changes to the beta kubernetes python API.
There are two workarounds:
kubernetes==9.0
pip install git+https://github.com/jupyterhub/kubespawner.git