Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: module 'kubernetes.client' has no attribute 'V1Subject' #1382

Open
fm2022aa opened this issue May 31, 2024 · 3 comments
Open

Error: module 'kubernetes.client' has no attribute 'V1Subject' #1382

fm2022aa opened this issue May 31, 2024 · 3 comments
Labels

Comments

@fm2022aa
Copy link

fm2022aa commented May 31, 2024

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

@fm2022aa fm2022aa added the bug label May 31, 2024
Copy link

welcome bot commented May 31, 2024

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

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.
welcome
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! 👋

Welcome to the Jupyter community! 🎉

@fm2022aa fm2022aa changed the title module 'kubernetes.client' has no attribute 'V1Subject' Error: module 'kubernetes.client' has no attribute 'V1Subject' May 31, 2024
@merqri
Copy link

merqri commented Jun 3, 2024

@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.

binding_subjects = client.V1Subject(

It uses V1Subject, which is not supported by kubernetes library version 29

I have also created a pull request that should solve this problem - #1384

@fm2022aa
Copy link
Author

fm2022aa commented Jun 3, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants