Open paf91 opened 2 months ago
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:
Okay so the culprit is the updated kubernetes pip version. EG 3.2.2 has 26.1.0 kubernetes python ver, EG 3.2.3 has 29.0.0
>>> import kubernetes; print(kubernetes.__version__)
29.0.0
I hope will find time to try to fix this
>>> name='spark'
>>> namespace='default'
>>> from kubernetes import client
>>> client.V1Subject(
... api_group="", kind="ServiceAccount", name=service_account_name, namespace=namespace
... )
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'kubernetes.client' has no attribute 'V1Subject'. Did you mean: 'RbacV1Subject'?
>>>
So this code cant execute:
Could this probably be related to new Kubernetes Client version where these have changed?
@lresende see my reply above
So, we should cap the kubernetes client for now I would say
@paf91 Greetings, I think the easiest and fastest way is to build a new image as I mentioned in https://github.com/jupyter-server/enterprise_gateway/issues/1382#issuecomment-2144831486.
Description
Whenever I start kernel based on kubernetes I'm getting this error on version 3.2.3:
Error Starting Kernel HTTP 500: Internal Server Error (Error from Gateway: [Error occurred creating role binding for namespace 'guest-fab3e59b-edbb-4e1d-912e-087b1798425b': module 'kubernetes.client' has no attribute 'V1Subject'] Error occurred creating role binding for namespace 'guest-fab3e59b-edbb-4e1d-912e-087b1798425b': module 'kubernetes.client' has no attribute 'V1Subject'. Ensure gateway url is valid and the Gateway instance is running.)
Reproduce
values.yaml:
helm upgrade --install enterprise-gateway https://github.com/jupyter-server/enterprise_gateway/releases/download/v3.2.3/jupyter_enterprise_gateway_helm-3.2.3.tar.gz --namespace enterprise-gateway -f ~/jupyter/gateway/values-balancer.yaml
kubectl get pods -n enterprise-gateway:![image](https://github.com/jupyter-server/enterprise_gateway/assets/12195041/2e430911-d37a-4d3f-b5f3-da4f73c5ae5d)
Try to run:
Response:
Enterprise gateway logs:
kubectl logs -n enterprise-gateway enterprise-gateway-cfbb54797-7dph8
Expected behavior
Kernel starts
Context
JEG 3.2.3 on K3s v1.28.5