enterprise_gateway
enterprise_gateway copied to clipboard
Error: module 'kubernetes.client' has no attribute 'V1Subject'
When I use the 3.2.3 image, I encountered this error when spawning a kernel:
[I 2024-05-31 08:44:21.065 EnterpriseGatewayApp] Created kernel namespace: jovyan-b4ca16d6-eb9f-431e-abef-e4f5ac9b344d
[W 2024-05-31 08:44:21.074 EnterpriseGatewayApp] Deleted kernel namespace: jovyan-b4ca16d6-eb9f-431e-abef-e4f5ac9b344d
[E 2024-05-31 08:44:21.074 EnterpriseGatewayApp] Error occurred creating role binding for namespace 'jovyan-b4ca16d6-eb9f-431e-abef-e4f5ac9b344d': module 'kubernetes.client' has no attribute 'V1Subject'
using the server image: jupyter/base-notebook:python-3.9.7
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:
@fm2022aa
Greetings! I ran into the same problem today. The fastest way to solve it for me was to build a new container with minimal changes:
FROM elyra/enterprise-gateway:3.2.3
USER root
RUN sed -i 's/V1Subject/RbacV1Subject/g' /opt/conda/lib/python3.10/site-packages/enterprise_gateway/services/processproxies/k8s.py
USER jovyan
As you can see the problem is in the line.
https://github.com/jupyter-server/enterprise_gateway/blob/d01e84a2457d44d14bd6bd3335307b9d0e3b483d/enterprise_gateway/services/processproxies/k8s.py#L352 It uses V1Subject, which is not supported by kubernetes library version 29
I have also created a pull request that should solve this problem - https://github.com/jupyter-server/enterprise_gateway/pull/1384
Greetings! I ran into the same problem today. The fastest way to solve it for me was to build a new container with minimal changes:
Thank you for your reply
I hope this issue gets fixed soon. Just change V1Subject to RbacV1Subject.