Skip to main content
Version 3.0

JupyterHub, with a JupyterLab
for each person on the team.

Six common scenarios, from the first installation to the Spark integration. Each one covers: what the chart already provides, what changes in the cluster, the values file commented line by line, and a step-by-step with verification.

ChartVersion3.0.3TypeapplicationAppVersion5.3.0
CompatibilityKubernetes1.32+OpenShift4.19+Rancher2.10.x+
Feature SupportLDAPsupportedS3supportedExternal DBsupportedIngresssupportedGateway APIsupported

The tdp-jupyter chart starts JupyterHub, which authenticates each person and starts a server of their own with JupyterLab 4.5.6, in a pod of the cluster, with a Python kernel that already includes PySpark. The Hub database, the size of the servers, the access and the connection to a Spark cluster are your decisions, and each scenario below covers one of them.

Your environment

If you fill in your environment details here, the examples and commands on the page use what you entered. The namespace, the release name and the values file are your choices, not the chart's.

Scenarios​

Install with the chart defaults, open the interface and start your notebook server.

You want to see JupyterHub working before deciding on resources, database or access. You will install without a values file, open the interface and log in with the user the chart creates. Three parts start. The Hub authenticates each person and starts their server. The proxy is the entry point that takes each user to their server. The user-scheduler is the scheduler for those servers. A DaemonSet, the image-puller, already downloads the notebook image on every node that can run notebooks. A person's notebook server, with JupyterLab, is only born when they log in and start it. The other scenarios start from this state.

Before you start

A valid TDP license in the cluster and, in the release namespace, the tdp-registry pull Secret, with your Tecnisys registry credentials.

User servers

One pod per person, created when they start their server, named <RELEASE_NAME>-notebook-<user>, with a persistent volume for their files.

Kernel

A Python kernel that already includes PySpark, the only one allowed on the servers (KernelSpecManager.allowed_kernelspecs).

Hub database

SQLite on a Hub PVC. Scenario 3 replaces it with an external PostgreSQL.

Image preload

The <RELEASE_NAME>-image-puller DaemonSet downloads the notebook image on every node that can run notebooks (TDP-Settings.imagePuller.enabled), so the first login does not wait for the download.

Access

Proxy Service of type NodePort, on the proxy.service.nodePorts ports. Login with the admin user and a temporary password.

Spark

Local mode (local[*]): Spark runs inside the user's own server. Scenario 6 connects a Spark cluster.

What starts in the namespace with the chart defaults

namespace <NAMESPACE>NodePortstartsWho connectsa node's IPService NodePort…-proxy-publicProxyentry pointHubadmin loginServers ×3one pod per userEach user's PVCstorage.capacityuser-schedulerschedules the serversimage-pullerDaemonSetSQLiteHub PVC
  1. Who connects. The team reaches JupyterHub through a cluster node's IP, on the proxy.service.nodePorts.http port. Chart default: NodePort.
  2. Proxy Service. JupyterHub's entry point in the cluster. The name is <RELEASE_NAME>-tdp-jupyter-proxy-public, or <RELEASE_NAME>-proxy-public when the release name already contains tdp-jupyter. Chart default: NodePort, on the proxy.service.nodePorts ports. (tdp-jupyter.proxy.service.type)
  3. Proxy. Receives all JupyterHub traffic: it takes the login to the Hub and each user to their own server.
  4. Hub. Authenticates each person and starts a server of their own for each one. By default, the login is the admin user with the password in DummyAuthenticator.password. Chart default: dummy authenticator · resources in hub.resources. (tdp-jupyter.hub.config.JupyterHub.authenticator_class)
  5. User servers. Each person who starts their server gets a pod with JupyterLab, named <RELEASE_NAME>-notebook-<user>, with the CPU and memory guarantee and limit from singleuser.cpu and singleuser.memory. The kernel is Python, already with PySpark. Chart default: CPU and memory in singleuser.cpu and singleuser.memory. (tdp-jupyter.singleuser)
  6. Each user's volume. Each person's working directory, in a claim-<user> PVC that JupyterHub creates on their first login, in the StorageClass you indicate or in the cluster's default. The PVC stays in the cluster after a helm uninstall. Chart default: size in singleuser.storage.capacity, cluster default StorageClass. (tdp-jupyter.singleuser.storage)
  7. user-scheduler. The scheduler for the user servers, which the chart starts next to the Hub. Chart default: on. (tdp-jupyter.scheduling.userScheduler.enabled)
  8. Notebook image preload. The <RELEASE_NAME>-image-puller DaemonSet downloads the notebook image on every node that can run notebooks as soon as the chart is installed or the image tag changes, so the first login does not wait for the download. Chart default: on. (TDP-Settings.imagePuller.enabled)
  9. Hub database. The Hub stores users and servers in a SQLite database, on a persistent volume of the release itself. Chart default: SQLite on a PVC. (tdp-jupyter.hub.db.type)
What starts in the namespace with the chart defaults. Click an element to see what it is and its default.

Check the TDP license

The chart requires a valid TDP license installed in the cluster.

Terminal input
kubectl get platformlicenses -A

It worked when

The license appears in the list. If it does not, install or renew it before continuing (Licensing Configuration).

Create the pull Secret in the namespace

The JupyterHub images come from the Tecnisys registry, which requires login. The tdp-registry Secret must exist in the release namespace before the installation.

If the namespace does not exist yet, create it first, with kubectl create namespace <NAMESPACE>. How to get the registry credential is in Prerequisites.

Terminal input
kubectl -n <NAMESPACE> create secret docker-registry tdp-registry \
--docker-server=registry.tecnisys.com.br \
--docker-username=<REGISTRY_USERNAME> --docker-password=<REGISTRY_CLI_SECRET>

It worked when

Terminal input
kubectl -n <NAMESPACE> get secret tdp-registry

The Secret appears in the namespace.

Install with the defaults

Without a values file, the chart starts exactly as in the figure above.

The cluster needs a persistent volume provisioner, because the Hub database and each user's files live on PVCs. The requirements common to all charts are in Prerequisites. Without --version, helm install from the OCI registry installs the latest published version of the chart. The commands on this page pin the version of this documentation.

Terminal input
helm upgrade --install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-jupyter \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace --timeout 10m

On Red Hat OpenShift 4.19+, the Hub cannot have a fixed UID and GID: the restricted-v2 SCC must assign them. Without that, the Hub pod is refused and helm --wait or the Argo CD sync never finish, because the Job that would adjust the Hub only runs after all the pods are ready. Install like this:

Terminal input
helm upgrade --install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-jupyter \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace --timeout 10m \
--set openshift.enabled=true \
--set tdp-jupyter.scheduling.userScheduler.containerSecurityContext.runAsNonRoot=true \
--set tdp-jupyter.hub.podSecurityContext.runAsUser=null \
--set tdp-jupyter.hub.podSecurityContext.runAsGroup=null \
--set tdp-jupyter.hub.containerSecurityContext.runAsUser=null \
--set tdp-jupyter.hub.containerSecurityContext.runAsGroup=null

To keep these options in a values file, instead of passing them with --set:

Click the markers to understand each line. Use only on OpenShift.

1openshift:
2enabled: true
3
4tdp-jupyter:
5hub:
6 podSecurityContext:
7 runAsUser: null
8 runAsGroup: null
9 containerSecurityContext:
10 runAsUser: null
11 runAsGroup: null
12scheduling:
13 userScheduler:
14 containerSecurityContext:
15 runAsNonRoot: true

openshift sits outside the chart prefix, at the root of the values file.

  1. At the root (linha 1). openshift sits outside the chart prefix, at the root of the values file.
  2. Forces OpenShift mode (linha 2). The chart detects OpenShift on its own, through the cluster API. true forces OpenShift mode, only for when the detection cannot reach the API, as in very restricted networks.
  3. Chart prefix (linha 4). The chart is a JupyterHub umbrella: what belongs to JupyterHub sits under the subchart key. Without this prefix, Helm does not apply the block.
  4. Empty Hub UID and GID (linha 7). They let the OpenShift restricted-v2 SCC assign the Hub pod's UID and GID. The same goes for the following lines, in the container.
  5. user-scheduler (linha 15). Avoids PodSecurity admission warnings in clusters that enforce the restricted profile. On standard Kubernetes, it stays false.
OpenShift

When OpenShift mode is on, the chart also prepares the user servers: writable volumes for /etc/passwd and /etc/group, filled in with the pod's UID and GID by an init container, and a Job after each install and upgrade (<RELEASE_NAME>-openshift-security) that adjusts the Hub and user-scheduler Deployments. On standard Kubernetes, keep openshift.enabled and userScheduler.containerSecurityContext.runAsNonRoot as false.

It worked when

Terminal input
kubectl -n <NAMESPACE> get pods -l app.kubernetes.io/instance=<RELEASE_NAME>

The Hub, proxy, user-scheduler and image-puller pods reach Running.

If a pod does not start

The pod events show the reason:

Terminal input
kubectl -n <NAMESPACE> describe pod <POD_NAME>

Then look for the message in When something goes wrong.

Wait for the notebook image to reach the nodes

The notebook image is large. The first login only skips the download wait when the preload has finished.

Terminal input
kubectl -n <NAMESPACE> get daemonset <RELEASE_NAME>-image-puller

It worked when

The READY column equals DESIRED.

Open the interface

With the NodePort Service, the interface responds on the IP of any cluster node.

Terminal input
kubectl get nodes -o wide
# Go to http://<NODE_IP>:30080

Without direct access to the nodes, open a tunnel from your machine to the proxy Service. The name is <RELEASE_NAME>-tdp-jupyter-proxy-public, or <RELEASE_NAME>-proxy-public when the release name already contains tdp-jupyter:

Terminal input
kubectl -n <NAMESPACE> get svc -l component=proxy-public
kubectl -n <NAMESPACE> port-forward svc/<RELEASE_NAME>-tdp-jupyter-proxy-public 8080:80
# Go to http://localhost:8080

It worked when

The JupyterHub interface opens and accepts the admin user with the temporary password. After the login, the notebook server starts and JupyterLab opens. The password, and how to change it before any real use, are in Security - JupyterLab.
If the login fails with server failed to start

If the login failed while the image was being downloaded, start the server again in the Hub (Home, then Start My Server) when the preload finishes. The Hub waits for the server for up to singleuser.startTimeout seconds. If the image still takes longer than that, increase this value (scenario 2).

When something goes wrong​

Troubleshooting

Paste the error message or choose the symptom. The answer comes with the cause, what to do and the command.

  1. Installation refused: license check failed. Cause: The TDP license is missing or invalid in the cluster. What to do: Check the license with the command below. If it is not VALID, install or renew it (Licensing Configuration) and repeat the installation.
  2. ImagePullBackOff on the JupyterHub pods. Cause: The tdp-registry Secret does not exist in the release namespace. The JupyterHub images come from the Tecnisys registry, which requires login. What to do: Create the Secret in the namespace (scenario 1) and apply the release again.
  3. Pods in Pending. Cause: The StorageClass does not exist or has no capacity. The Hub's SQLite database and each user's volume are PVCs. What to do: Check that the StorageClass exists and has capacity, or indicate another one in singleuser.storage.dynamic.storageClass (scenario 2).
  4. OpenShift refuses the Hub pod and the installation does not finish. Cause: The Hub was installed with a fixed UID and GID, which the restricted-v2 SCC refuses. The Job that adjusts the Hub only runs after all the pods are ready, so helm --wait or the Argo CD sync never finish. What to do: Install with the Hub's UID and GID empty (First contact scenario, OpenShift).
  5. First login: server failed to start or slow start. Cause: The notebook image is about 6 GB, and a node downloads it the first time a notebook server starts on it, which can take many minutes on a slow link. What to do: Before the first login, check that the <RELEASE_NAME>-image-puller DaemonSet has finished (READY equal to DESIRED). If the login failed during the download, start the server again in the Hub (Home, then Start My Server) when the preload finishes. If the image still takes longer than the wait, increase singleuser.startTimeout (scenario 2).
  6. Pods OOMKilled. Cause: The CPU or memory limits are too low for the load. What to do: Adjust hub.resources or singleuser.cpu and singleuser.memory (scenario 2).
  7. PostgreSQL did not become ready in time. Cause: The <RELEASE_NAME>-check-db-ready Job could not reach the external PostgreSQL at the host and port of the hub.db.url URL. What to do: Check the host and port in hub.db.url and that PostgreSQL is up and reachable from the JupyterHub namespace.
  8. Database creation Job failed (external database). Cause: The <RELEASE_NAME>-create-db Job could not create the database and the user in the external PostgreSQL: administrator Secret, address or password. What to do: The failed Job stays in the cluster, with its pod and log. Fix the cause and run the same helm upgrade --install: it replaces the failed Job.
  9. The Hub does not connect to the external PostgreSQL. Cause: PostgreSQL is not reachable from the Hub or the credentials do not match. What to do: Check that PostgreSQL is reachable and that the <RELEASE_NAME>-jupyter-database Secret exists. The test below runs from inside the Hub pod.
  10. Warning about recreate at the end of the installation. Cause: With the external database on, the installation notes show this warning when TDP-Settings.externalDatabase.recreate is true: the Hub's database and user are deleted and recreated on every install and upgrade. What to do: To keep the Hub's database and user, leave TDP-Settings.externalDatabase.recreate as false (scenario 3).
  11. The published hostname does not open. Cause: The hostname does not resolve to the Ingress controller or to the Gateway. What to do: Point the hostname to the external IP of the controller (or of the Gateway) in DNS or in /etc/hosts. On OpenShift, check the Route.
  12. Another problem. Cause: Start with the pods' state and the Hub and proxy logs. What to do: The pod events show what keeps the pod from starting. The Hub logs show what happens at login and when the servers start.

What stays after uninstalling​

Terminal input
helm uninstall <RELEASE_NAME> -n <NAMESPACE>

The uninstall stops the running notebook servers but keeps the user volumes: one PVC per person, claim-<user>, which JupyterHub creates on their first login and which Helm does not manage. A new installation in the same namespace finds them again. To list them:

Terminal input
kubectl -n <NAMESPACE> get pvc -l component=singleuser-storage,app.kubernetes.io/instance=<RELEASE_NAME>
Deleting the volumes deletes the notebooks

Deleting these PVCs permanently deletes the notebooks and files of all users. Back up what you need first.

Terminal input
kubectl -n <NAMESPACE> delete pvc -l component=singleuser-storage,app.kubernetes.io/instance=<RELEASE_NAME>

The removal order for all components and the platform is in Uninstallation.

Lists in the values file​

The servers' network egress rules, in tdp-jupyter.singleuser.networkPolicy.egress, are a list. When your values file defines this list, Helm does not add your rules to the chart's: it replaces the entire list with yours. To add a rule, copy the chart's complete list and add yours to it. What the chart's list allows is in Security - JupyterLab.

All parameters​

Filter by name or by group. The chart prefix is already filled in. Keys without a prefix sit at the root of the values file.

42 of 42 parameters

ParameterDescriptionChart default
tdp-jupyter.enabledGeneralEnables the JupyterHub deploymenttrue
tdp-jupyter.fullnameOverrideGeneralReplaces the full name of the resources. Empty, the names follow the release namenull
openshift.enabledGeneralForces OpenShift mode when the automatic detection cannot reach the APIfalse
tdp-jupyter.hub.resources.requests.cpuHubCPU reserved for the Hub500m
tdp-jupyter.hub.resources.requests.memoryHubMemory reserved for the Hub1Gi
tdp-jupyter.hub.resources.limits.cpuHubHub CPU limit1000m
tdp-jupyter.hub.resources.limits.memoryHubHub memory limit2Gi
tdp-jupyter.hub.config.JupyterHub.authenticator_classAccessAuthentication classdummy
tdp-jupyter.hub.config.DummyAuthenticator.usernameAccessDefault useradmin
tdp-jupyter.hub.config.DummyAuthenticator.passwordAccessDefault password. Change it before any real useChangeMe!T3c
tdp-jupyter.proxy.service.typeAccessProxy Service typeNodePort
tdp-jupyter.proxy.service.nodePorts.httpAccessHTTP port on the nodes30080
tdp-jupyter.proxy.service.nodePorts.httpsAccessHTTPS port on the nodes30443
tdp-jupyter.singleuser.cpu.limitServersCPU limit of each server4
tdp-jupyter.singleuser.cpu.guaranteeServersCPU guaranteed for each server2
tdp-jupyter.singleuser.memory.limitServersMemory limit of each server8G
tdp-jupyter.singleuser.memory.guaranteeServersMemory guaranteed for each server4G
tdp-jupyter.singleuser.startTimeoutServersSeconds that a notebook server may take to start (the first time on each node downloads the notebook image)1800
TDP-Settings.imagePuller.enabledServersPreloads the notebook image on every node that can run notebookstrue
TDP-Settings.imagePuller.nodeSelectorServersNodes where the preload runs. They must match the notebook nodes{} (singleuser.nodeSelector applies)
TDP-Settings.imagePuller.tolerationsServersPreload tolerations. They must match those of the notebook nodes[]
tdp-jupyter.cull.enabledServersShuts down idle notebook servers (idle culler)true
tdp-jupyter.cull.timeoutServersSeconds of inactivity after which the server is shut down3600
tdp-jupyter.singleuser.storage.capacityServersSize of each user's volume5Gi
tdp-jupyter.singleuser.storage.dynamic.storageClassServersStorageClass of the user volumesnull (cluster default)
tdp-jupyter.singleuser.serviceAccountNameServersServiceAccount of the notebook servers, created by the charttdp-jupyter-singleuser
tdp-jupyter.singleuser.networkPolicy.enabledServersNetworkPolicy of the notebook serverstrue
tdp-jupyter.scheduling.userScheduler.enabledServersScheduler for the user serverstrue
tdp-jupyter.hub.db.typeDatabaseHub databasesqlite-pvc
TDP-Settings.externalDatabase.enabledDatabaseExternal database helpers (Jobs that check PostgreSQL and create the database and user)false
TDP-Settings.externalDatabase.recreateDatabaseDeletes and recreates the database and user on every install or upgradefalse
TDP-Settings.externalDatabase.externalSecret.releaseNameDatabaseSecret with the PostgreSQL administrator password (postgres-password key)tdp-postgresql-auth
tdpSparkIntegration.enabledSparkPoints the notebooks at an external Spark clusterfalse
tdp-jupyter.singleuser.extraEnv.SPARK_DRIVER_MEMORYSparkSpark driver memory4g
tdp-jupyter.singleuser.extraEnv.SPARK_EXECUTOR_MEMORYSparkSpark executor memory4g
TDP-Settings.gateway.ingress.enabledExposureRenders the Ingress (Route on OpenShift)false
TDP-Settings.gateway.gatewayApi.enabledExposureRenders the Gateway API HTTPRoutefalse
ingress.ingressClassNameExposureIngress classnginx
ingress.hostsExposureIngress hostnames and pathsjupyter.tdp.local, path /
gatewayApi.gatewayClassNameExposureGatewayClass of the Gateway created by the chart""
gatewayApi.parentRefsExposureGateway the HTTPRoute attaches to[]
gatewayApi.jupyter.hostnamesExposureHTTPRoute hostnamesjupyter.tdp.local

For the complete list of parameters, see the chart's values.yaml or run helm show values for the installed version.

Next steps​