canonical / bundle-kubeflow

Charmed Kubeflow
Apache License 2.0
99 stars 48 forks source link

VSCode notebook does not open the jupyter notebook #603

Open Barteus opened 1 year ago

Barteus commented 1 year ago

Screenshot from 2023-05-24 09-12-30

Reproduce:

  1. Deploy CKF 1.7
  2. Create a notebook with VSCode
  3. Clone kubeflow-examples repository
  4. Open any jupyter notebook

Expectation: Jupyter notebook is opened and I can run the code in it.

kimwnasptd commented 1 year ago

Thanks for the feedback @Barteus!

The first thing we'll need to confirm is whether this also works on upstream as well, since in CKF we are not meddling with these images at all. And also the resources created for each Notebook (StatefulSet, VirtualService, Service etc) are created by the Notebook Controller which is not affected at all by the Charms.

orfeas-k commented 1 year ago

I tried to reproduce this and deployed CKF on MicroK8s in AWS EC2 instance of type t3.2xlarge, Ubuntu image and 80 gb disk space.

When I reached the 4th step, things are as described. I got though a notification from VSCode in the bottom right stating:

code-server is being accessed in an insecure context. Web views, the clipboard, and other functionality may not work as expected.

And this makes sense (at least in my case) since the connection is not a secure one

Screenshot from 2023-08-08 11-52-19

Then, in order to investigate what @kimwnasptd mentioned, I went ahead and deployed an upstream Kubeflow to a machine with the same specs following these instructions and connecting to it with these meaning I sshed into the machine with ssh -L 8080:localhost:8080 ubuntu@machine-external-ip and then ran the kubectl port-forward svc/istio-ingressgateway -n istio-system 8080:80 inside the machine.

image

I tried to connect to CKF using kubectl port-forward as well but it kept redirecting me to http://10.64.140.43.nip.io/.

i-chvets commented 1 year ago

Confirm that VSCode requires secure connection. Related to:

code-server is being accessed in an insecure context. Web views, the clipboard, and other functionality may not work as expected.

Instructions to setup HTTPS: https://github.com/canonical/istio-operators/pull/277#issue-1731152795

If VSCode cannot work in secure connectin this issue will be closed.