I would like to deploy just jupyterlab on my k3s server. It works fine when I use the LAN ip and port to access it but when I put it behind my nginx reverse proxy, after login I get a blank screen.
apiVersion: v1
kind: Namespace
metadata:
name: jupyterlab
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: jupyterlab-pvc
namespace: jupyterlab
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi # Adjust the size as needed
storageClassName: "longhorn" # This should be your default storage class
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: jupyterlab
namespace: jupyterlab
spec:
replicas: 1
selector:
matchLabels:
app: jupyterlab
template:
metadata:
labels:
app: jupyterlab
spec:
securityContext:
fsGroup: 1000
containers:
- name: jupyterlab
image: jupyter/datascience-notebook
ports:
- containerPort: 8888
volumeMounts:
- mountPath: "/home/jovyan"
name: jupyter-storage
resources:
requests:
memory: "10Gi"
cpu: "2"
securityContext:
runAsUser: 1000 # User ID for the user jovyan
volumes:
- name: jupyter-storage
persistentVolumeClaim:
claimName: jupyterlab-pvc
---
apiVersion: v1
kind: Service
metadata:
name: jupyterlab
namespace: jupyterlab
spec:
type: LoadBalancer
loadBalancerIP: 192.168.1.151
ports:
- port: 8888
targetPort: 8888
selector:
app: jupyterlab
I am using the GUI of nginx reverse proxy and all I do is put the IP, port, and assign SSL. I do not have any error when I inspect console and there are no errors on container side too. Is there an added step I am missing?
My reverse proxy is also running behind Cloudflare I am not sure if that is also causing an issue.