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.
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
- 1 · First contact
- 2 · Resources and volumes
- 3 · Hub database
- 4 · Publish at a URL
- 5 · Login through LDAP
- 6 · Spark and platform
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.
A valid TDP license in the cluster and, in the release namespace, the tdp-registry pull Secret, with your Tecnisys registry credentials.
One pod per person, created when they start their server, named <RELEASE_NAME>-notebook-<user>, with a persistent volume for their files.
A Python kernel that already includes PySpark, the only one allowed on the servers (KernelSpecManager.allowed_kernelspecs).
SQLite on a Hub PVC. Scenario 3 replaces it with an external PostgreSQL.
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.
Proxy Service of type NodePort, on the proxy.service.nodePorts ports. Login with the admin user and a temporary password.
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
- Who connects. The team reaches JupyterHub through a cluster node's IP, on the proxy.service.nodePorts.http port. Chart default:
NodePort. - 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) - Proxy. Receives all JupyterHub traffic: it takes the login to the Hub and each user to their own server.
- 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) - 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) - 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) - user-scheduler. The scheduler for the user servers, which the chart starts next to the Hub. Chart default:
on. (tdp-jupyter.scheduling.userScheduler.enabled) - 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) - 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)
Check the TDP license
The chart requires a valid TDP license installed in the cluster.
kubectl get platformlicenses -A
It worked when
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.
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
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.
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:
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:
1openshift:2enabled: true34tdp-jupyter:5hub:6 podSecurityContext:7 runAsUser: null8 runAsGroup: null9 containerSecurityContext:10 runAsUser: null11 runAsGroup: null12scheduling:13 userScheduler:14 containerSecurityContext:15 runAsNonRoot: true
openshift sits outside the chart prefix, at the root of the values file.
- At the root (linha 1). openshift sits outside the chart prefix, at the root of the values file.
- 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.
- 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.
- 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.
- user-scheduler (linha 15). Avoids PodSecurity admission warnings in clusters that enforce the restricted profile. On standard Kubernetes, it stays false.
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
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:
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.
kubectl -n <NAMESPACE> get daemonset <RELEASE_NAME>-image-puller
It worked when
READY column equals DESIRED.Open the interface
With the NodePort Service, the interface responds on the IP of any cluster node.
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:
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
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).
How much CPU, memory and disk each notebook server gets, and how much the Hub gets.
Each person who starts a notebook server gets a pod of their own, created by the Hub. Sizing JupyterHub means adjusting those pods and the Hub's: how much CPU and memory each server gets, how much disk each person has in their volume and how much the Hub gets. Preloading the notebook image also matters, since it decides on which nodes the first start already finds the image.
The team has grown or the notebooks now process more data. The cluster must fit the servers of everyone working at the same time.
The chart already provides a default for all of this: a CPU and memory guarantee and limit for each server, one volume per person in the cluster's default StorageClass, requests and limits for the Hub and preloading enabled on every node that can run notebooks. The defaults for each server are high performance and do not follow the load or the size of the team: when they change, you are the one who adjusts them.
CPU in singleuser.cpu.guarantee and singleuser.cpu.limit. Memory in singleuser.memory.guarantee and singleuser.memory.limit.
Size in singleuser.storage.capacity, in the StorageClass of singleuser.storage.dynamic.storageClass. Empty uses the cluster default.
Requests and limits in hub.resources.
The Hub waits for the server to come up for up to singleuser.startTimeout seconds. The first start on each node downloads the notebook image, about 6 GB in size.
On (TDP-Settings.imagePuller.enabled), on the nodes of TDP-Settings.imagePuller.nodeSelector and tolerations. Without its own nodeSelector, the one from singleuser.nodeSelector applies. When notebooks run only on some nodes of a large cluster, point the preload at those nodes.
The SPARK_DRIVER_MEMORY and SPARK_EXECUTOR_MEMORY variables, in singleuser.extraEnv.
The user servers and their volumes
- Who connects. The team reaches JupyterHub through a cluster node's IP, on the proxy.service.nodePorts.http port. Chart default:
NodePort. - 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) - Proxy. Receives all JupyterHub traffic: it takes the login to the Hub and each user to their own server.
- 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) - 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) - 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) - user-scheduler. The scheduler for the user servers, which the chart starts next to the Hub. Chart default:
on. (tdp-jupyter.scheduling.userScheduler.enabled) - 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) - 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)
The values file
The values in the example are the chart's own defaults: replace them with what your use requires.
1tdp-jupyter:2hub:3 resources:4 requests:5 cpu: 500m6 memory: 1Gi7 limits:8 cpu: 1000m9 memory: 2Gi10singleuser:11 startTimeout: 180012 cpu:13 limit: 414 guarantee: 215 memory:16 limit: 8G17 guarantee: 4G18 storage:19 dynamic:20 storageClass: <STORAGE_CLASS>21 capacity: 5Gi2223TDP-Settings:24imagePuller:25 enabled: true26 nodeSelector: {}27 tolerations: []
Everything that belongs to JupyterHub sits under the subchart key.
- Chart prefix (linha 1). Everything that belongs to JupyterHub sits under the subchart key.
- Hub requests (linha 4). CPU and memory reserved for the Hub pod.
- Hub limits (linha 7). The maximum CPU and memory of the Hub pod.
- Wait for the server (linha 11). Seconds that a notebook server may take to start. The first time on each node includes downloading the notebook image.
- CPU of each server (linha 13). limit is the maximum. Guarantee is what stays reserved for the server.
- Memory of each server (linha 16). limit is the maximum. Guarantee is what stays reserved for the server.
- StorageClass (linha 20). Where the user volumes are created. Without this line, the cluster default.
- Volume size (linha 21). The size of each user's volume.
- At the root (linha 23). TDP-Settings sits outside the chart prefix, at the root of the values file.
- Image preload (linha 25). Downloads the notebook image on every node that can run notebooks, as soon as the chart is installed or the image tag changes.
- Preload nodes (linha 26). nodeSelector and tolerations must match the nodes where the notebooks run. Without a nodeSelector here, the one from singleuser.nodeSelector applies.
Apply it to the release
The same command installs and upgrades.
helm upgrade --install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-jupyter \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace --timeout 10m \
-f <VALUES_FILE>
It worked when
kubectl -n <NAMESPACE> get pvc -l app.kubernetes.io/instance=<RELEASE_NAME>
The PVCs appear as Bound after each user starts their server.
If a PVC stays in Pending
The StorageClass you indicated does not exist or has no capacity. See When something goes wrong.
Replace the Hub's SQLite with a PostgreSQL of your own, with the database and user created by the chart.
This tab decides where the Hub stores the users and the state of each one's servers. The chart already handles this on its own: by default, it is a SQLite on a volume of the Hub itself, with nothing to configure. You only need to change this if you want to use a PostgreSQL that already exists, such as the one from the tdp-postgresql chart. For that, you turn on the chart's external database helpers, which are two Jobs, and tell it where PostgreSQL is. Before the installation, the first Job checks that PostgreSQL responds. The second creates the Hub's database and user, with a generated password, and writes the credentials to a Secret that the Hub reads.
SQLite on a Hub PVC. External database helpers off (TDP-Settings.externalDatabase.enabled).
Only for the external PostgreSQL: the PostgreSQL reachable from the cluster and, in the JupyterHub namespace, the Secret with its administrator password, under the postgres-password key. The chart default is the tdp-postgresql-auth Secret.
What changes in the namespace with each database
Where the Hub database lives
- Who connects. The team reaches JupyterHub through a cluster node's IP, on the proxy.service.nodePorts.http port. Chart default:
NodePort. - 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) - Proxy. Receives all JupyterHub traffic: it takes the login to the Hub and each user to their own server.
- 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) - 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) - 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) - user-scheduler. The scheduler for the user servers, which the chart starts next to the Hub. Chart default:
on. (tdp-jupyter.scheduling.userScheduler.enabled) - 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) - 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)
Where the Hub database lives: SQLite (default)
- Who connects. The team reaches JupyterHub through a cluster node's IP, on the proxy.service.nodePorts.http port. Chart default:
NodePort. - 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) - Proxy. Receives all JupyterHub traffic: it takes the login to the Hub and each user to their own server.
- 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) - 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) - 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) - user-scheduler. The scheduler for the user servers, which the chart starts next to the Hub. Chart default:
on. (tdp-jupyter.scheduling.userScheduler.enabled) - 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) - 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)
Where the Hub database lives: External PostgreSQL
- Who connects. The team reaches JupyterHub through a cluster node's IP, on the proxy.service.nodePorts.http port. Chart default:
NodePort. - 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) - Proxy. Receives all JupyterHub traffic: it takes the login to the Hub and each user to their own server.
- 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) - 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) - 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) - user-scheduler. The scheduler for the user servers, which the chart starts next to the Hub. Chart default:
on. (tdp-jupyter.scheduling.userScheduler.enabled) - 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) - Database connection Secret. Created by a chart Job before the installation: the Job creates the database and the user in the external PostgreSQL, generates the password and writes the user, password and database to this Secret. Chart default:
does not exist (only with the external database). (tdp-jupyter.hub.extraEnv.PGPASSWORD) - External PostgreSQL. A PostgreSQL outside the release, for example the one from the tdp-postgresql chart. The administrator password comes from the Secret indicated in externalSecret.releaseName. Chart default:
off (SQLite). (TDP-Settings.externalDatabase.enabled: true)
SQLite. This is what the chart starts without a values file: a database on a persistent volume of the Hub, with nothing to configure. To use a PostgreSQL, choose External PostgreSQL above.
External PostgreSQL. Two blocks change together. In TDP-Settings.externalDatabase, at the root of the values file, the helpers are turned on: without them, the Jobs that prepare the database are not created. Under the chart prefix, hub.db says where PostgreSQL is and hub.extraEnv gives the Hub the password the Job generated.
1TDP-Settings:2externalDatabase:3 enabled: true4 recreate: false5 externalSecret:6 releaseName: "tdp-postgresql-auth"78tdp-jupyter:9hub:10 db:11 type: postgres12 url: "postgresql://jupyter@<POSTGRESQL_SERVICE>.<NAMESPACE>.svc.cluster.local:5432/jupyterhub_db"13 password: null14 upgrade: false15 extraEnv:16 PGPASSWORD:17 valueFrom:18 secretKeyRef:19 name: "<RELEASE_NAME>-jupyter-database"20 key: password
Turn on the Jobs that, before the installation and each upgrade, check PostgreSQL and create the Hub's database and user.
- External database helpers (linha 3). Turn on the Jobs that, before the installation and each upgrade, check PostgreSQL and create the Hub's database and user.
- recreate (linha 4). With true, the Job deletes and recreates the database and the user on every install or upgrade, and the Hub data is lost. Keep false.
- Administrator Secret (linha 6). Secret, in the JupyterHub namespace, with the PostgreSQL administrator password under the postgres-password key. The chart default is tdp-postgresql-auth.
- PostgreSQL (linha 11). The Hub starts storing its data in PostgreSQL instead of SQLite.
- URL (linha 12). In the postgresql://user@host:port/database format. The chart takes from it the user and the database the Job creates, and the host and port it checks. If the database is postgres, the Job creates nothing.
- Credentials Secret (linha 19). Created by the chart Job, with user, password and database. On an upgrade, the Job reuses the password already in it.
The PostgreSQL Service, in the tdp-postgresql chart, is <POSTGRESQL_RELEASE>-tdp-postgresql, or just <POSTGRESQL_RELEASE> when the release name already contains tdp-postgresql.
Check the administrator Secret
The chart Jobs read the administrator password from this Secret, in the JupyterHub namespace.
kubectl -n <NAMESPACE> get secret tdp-postgresql-auth
Write the values file
Replace the Service and the namespace with those of your PostgreSQL.
If you already have a JupyterHub values file, add the blocks to it.
Apply it to the release
The same command installs and upgrades. The database Jobs run before the Hub starts.
helm upgrade --install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-jupyter \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace --timeout 10m \
-f <VALUES_FILE>
It worked when
kubectl -n <NAMESPACE> get secret <RELEASE_NAME>-jupyter-database
kubectl -n <NAMESPACE> get pods -l app.kubernetes.io/instance=<RELEASE_NAME>
The credentials Secret exists and the Hub pod reaches Running.
If the database creation Job fails
The Job that fails stays in the cluster, with its pod and log:
kubectl -n <NAMESPACE> get job <RELEASE_NAME>-create-db
kubectl -n <NAMESPACE> logs job/<RELEASE_NAME>-create-db
After fixing the cause (administrator Secret, PostgreSQL address or password), run the same helm upgrade --install again: it replaces the failed Job, with no need to delete it by hand.
To compare the embedded and the external database across the TDP charts in general, see General Configuration.
NodePort, LoadBalancer, Ingress or Gateway API: how the team reaches JupyterHub.
The chart already publishes JupyterHub in one way: the proxy Service is of type NodePort, and the interface responds on the IP of any cluster node. You want another way in. Through the Service type, JupyterHub can receive an external IP from the cluster provider (LoadBalancer) or stay internal only (ClusterIP), reached by port-forward. For an address with a hostname, there are two ways, and only one can be on. An Ingress is the rule the cluster's Ingress controller uses to take a hostname to a Service. The chart creates the Ingress, which on OpenShift becomes its own Route. The Gateway API is the Kubernetes model in which a Gateway receives traffic and an HTTPRoute forwards it to the Service. The chart creates the HTTPRoute and, if you ask for it, the Gateway itself.
Proxy Service of type NodePort, on the proxy.service.nodePorts ports. Ingress and Gateway API off.
The admin user with a temporary password. Before publishing, change the password or turn on LDAP (scenario 5).
How the team reaches JupyterHub
How JupyterHub is reached
- Who connects. The team reaches JupyterHub through a cluster node's IP, on the proxy.service.nodePorts.http port. Chart default:
NodePort. - 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) - Proxy. Receives all JupyterHub traffic: it takes the login to the Hub and each user to their own server.
- 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) - 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) - 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) - user-scheduler. The scheduler for the user servers, which the chart starts next to the Hub. Chart default:
on. (tdp-jupyter.scheduling.userScheduler.enabled) - 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) - 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)
How JupyterHub is reached: NodePort (default)
- Who connects. The team reaches JupyterHub through a cluster node's IP, on the proxy.service.nodePorts.http port. Chart default:
NodePort. - 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) - Proxy. Receives all JupyterHub traffic: it takes the login to the Hub and each user to their own server.
- 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) - 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) - 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) - user-scheduler. The scheduler for the user servers, which the chart starts next to the Hub. Chart default:
on. (tdp-jupyter.scheduling.userScheduler.enabled) - 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) - 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)
How JupyterHub is reached: LoadBalancer
- Who connects. The team reaches JupyterHub through the external IP that the cluster provider gives the Service. Chart default:
NodePort. - 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) - Proxy. Receives all JupyterHub traffic: it takes the login to the Hub and each user to their own server.
- 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) - 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) - 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) - user-scheduler. The scheduler for the user servers, which the chart starts next to the Hub. Chart default:
on. (tdp-jupyter.scheduling.userScheduler.enabled) - 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) - 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)
How JupyterHub is reached: Internal only (ClusterIP)
- Who connects. With the internal-only Service, each person opens a tunnel from their own machine to it with kubectl port-forward. Chart default:
NodePort. - 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) - Proxy. Receives all JupyterHub traffic: it takes the login to the Hub and each user to their own server.
- 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) - 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) - 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) - user-scheduler. The scheduler for the user servers, which the chart starts next to the Hub. Chart default:
on. (tdp-jupyter.scheduling.userScheduler.enabled) - 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) - 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)
How JupyterHub is reached: Ingress
- Who connects. The team reaches JupyterHub through a fixed hostname, published by the Ingress. Chart default:
NodePort. - 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) - Ingress. The Ingress publishes the proxy Service at a hostname, through the cluster's Ingress controller. Chart default:
off. (TDP-Settings.gateway.ingress.enabled: true) - Proxy. Receives all JupyterHub traffic: it takes the login to the Hub and each user to their own server.
- 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) - 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) - 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) - user-scheduler. The scheduler for the user servers, which the chart starts next to the Hub. Chart default:
on. (tdp-jupyter.scheduling.userScheduler.enabled) - 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) - 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)
How JupyterHub is reached: Gateway API
- Who connects. The team reaches JupyterHub through a fixed hostname, published by the Gateway + HTTPRoute. Chart default:
NodePort. - 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) - Gateway and HTTPRoute (Gateway API). With the Gateway API on, the chart creates the HTTPRoute that forwards the JupyterHub hostname to the proxy Service and, if you ask for it, the Gateway itself, in the release namespace. Chart default:
off. (TDP-Settings.gateway.gatewayApi.enabled: true · gatewayApi.gateway.enabled) - Proxy. Receives all JupyterHub traffic: it takes the login to the Hub and each user to their own server.
- 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) - 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) - 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) - user-scheduler. The scheduler for the user servers, which the chart starts next to the Hub. Chart default:
on. (tdp-jupyter.scheduling.userScheduler.enabled) - 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) - 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)
NodePort. This is the default: the interface responds on the IP of any node, on the fixed ports in the block below. NodePort: Best suited when external access can reach the IP of the cluster nodes directly.
1tdp-jupyter:2proxy:3 service:4 type: NodePort5 nodePorts:6 http: 300807 https: 30443
NodePort opens the same port on every node of the cluster.
- Service type (linha 4). NodePort opens the same port on every node of the cluster.
- HTTP port (linha 6). The port on which the interface responds on the nodes.
- HTTPS port (linha 7). The Service's HTTPS port on the nodes.
kubectl get nodes -o wide
# Go to http://<NODE_IP>:30080
LoadBalancer. The cluster provider gives the proxy Service an external IP. LoadBalancer: Best suited when the cluster provider offers external load balancers for Services of this type.
1tdp-jupyter:2proxy:3 service:4 type: LoadBalancer
The external IP comes from the cluster's LoadBalancer provider.
- Service type (linha 4). The external IP comes from the cluster's LoadBalancer provider.
kubectl get svc -n <NAMESPACE> -l component=proxy-public
# Use the external IP shown
Internal only. The proxy Service stays inside the cluster only. Each person gets in through a tunnel from their own machine, with kubectl port-forward. Internal only: Best suited when JupyterHub is accessed only from inside the cluster or through a tunnel.
1tdp-jupyter:2proxy:3 service:4 type: ClusterIP
ClusterIP leaves the Service with only the cluster-internal address.
- Service type (linha 4). ClusterIP leaves the Service with only the cluster-internal address.
kubectl port-forward -n <NAMESPACE> svc/<RELEASE_NAME>-tdp-jupyter-proxy-public 8080:80
# Go to http://localhost:8080
Ingress. The chart creates an Ingress with your cluster's hostname and class, pointing to the proxy Service. On OpenShift, the chart publishes JupyterHub through its own Route, with the first hostname in the list, and does not create an Ingress: an Ingress would make the router create a second, conflicting Route for the same host. Ingress: Best suited when the cluster already has an Ingress controller, or when it runs on OpenShift. The ingress and TDP-Settings blocks sit at the root of the values file.
1ingress:2ingressClassName: <INGRESS_CLASS>3annotations:4 nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"5 nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"6hosts:7 - host: <JUPYTER_HOSTNAME>8 paths:9 - path: /10 pathType: Prefix11tls: []1213TDP-Settings:14gateway:15 ingress:16 enabled: true17 gatewayApi:18 enabled: false
nginx, openshift-default or your cluster's class.
- Ingress class (linha 2). nginx, openshift-default or your cluster's class.
- nginx timeouts (linha 4). nginx controller annotations for the proxy read and send time.
- Hostname (linha 7). On Kubernetes, something like jupyter.tdp.local. On OpenShift, jupyter-<NAMESPACE>.apps.<CLUSTER_DOMAIN>.
- tls (linha 11). Empty: JupyterHub is published over HTTP. With tls filled in, the address becomes HTTPS.
- TDP-Settings (linha 13). This is where the chart decides to render the Ingress. It sits at the root of the file, not under tdp-jupyter.
- Mutually exclusive (linha 18). Ingress and Gateway API cannot be on at the same time.
Gateway API. The chart creates the HTTPRoute that forwards the JupyterHub hostname to the proxy Service and, with gatewayApi.gateway.enabled, also the Gateway, with the GatewayClass and the listener you indicate. Gateway API: Best suited when the cluster already uses the Gateway API. TLS, when there is any, terminates at the Gateway listener, not at the HTTPRoute. The gatewayApi and TDP-Settings blocks sit at the root of the values file.
1gatewayApi:2gatewayClassName: <GATEWAY_CLASS>3gateway:4 enabled: true5 name: <GATEWAY_NAME>6 listeners:7 - name: web8 port: 80009 protocol: HTTP10 hostname: <JUPYTER_HOSTNAME>11parentRefs:12 - name: <GATEWAY_NAME>13jupyter:14 enabled: true15 hostnames:16 - <JUPYTER_HOSTNAME>17 rules:18 - matches:19 - path:20 type: PathPrefix21 value: /22 backendRefs:23 - name: ""24 port: 802526TDP-Settings:27gateway:28 ingress:29 enabled: false30 gatewayApi:31 enabled: true
Your cluster's Gateway controller class.
- GatewayClass (linha 2). Your cluster's Gateway controller class.
- Chart Gateway (linha 4). true makes the chart create the Gateway in the release namespace. With false, the HTTPRoute attaches to an existing Gateway, indicated in parentRefs.
- Listener (linha 6). Where the Gateway receives traffic: name, port, protocol and hostname.
- parentRefs (linha 11). The Gateway the HTTPRoute attaches to.
- backendRefs (linha 23). The empty name is filled in by the chart with the proxy Service.
- TDP-Settings (linha 26). Turns on the HTTPRoute and turns off the Ingress.
Add the blocks to the values file
Replace the class, hostname and Gateway placeholders with your cluster's values.
The Service type sits under the tdp-jupyter prefix; ingress, gatewayApi and TDP-Settings sit at the root of the file, next to it.
Apply it to the release
The Service changes type, or the Ingress, Route or HTTPRoute is created in the JupyterHub namespace.
helm upgrade --install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-jupyter \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace --timeout 10m \
-f <VALUES_FILE>
Make the hostname reach the clusterOpcional
Only with Ingress or Gateway API: the hostname must resolve to the Ingress controller or to the Gateway.
Point the hostname, in DNS or in /etc/hosts, to the external IP of the Ingress controller or of the Gateway. With the nginx controller, the IP comes from this command:
kubectl get svc -A -l app.kubernetes.io/name=ingress-nginx \
-o jsonpath='{.items[0].status.loadBalancer.ingress[0].ip}'
echo "<CONTROLLER_IP> <JUPYTER_HOSTNAME>" | sudo tee -a /etc/hosts
With the Gateway API, the IP is that of your Gateway controller's LoadBalancer Service.
With the Ingress on, the chart publishes the Route with the first hostname in ingress.hosts:
kubectl -n <NAMESPACE> get route
It worked when
http://<JUPYTER_HOSTNAME>.To compare Ingress, Gateway API and Route across the TDP charts, see External exposure.
Make JupyterHub validate the username and password in the company directory.
This tab decides who gets into the JupyterHub interface. By default, JupyterHub has a test login: the admin user, with a temporary password set in the values file. When the team starts using it, you want each person to log in with their company directory account (LDAP or Active Directory). The chart does this with the ldapauthenticator plugin, in a Hub configuration block with the server and the way to find the user. The bind is authentication in the directory with a DN and a password, and the DN (distinguished name) is the full name of an entry in the directory. With direct-bind LDAP, each user binds as themselves, with no service account. With Active Directory, a service account looks up each user's DN, and its password lives in a Secret created before the installation.
dummy authenticator (hub.config.JupyterHub.authenticator_class), with the admin user and the password in hub.config.DummyAuthenticator.password.
ldapauthenticator.LDAPAuthenticator, configured in hub.config.LDAPAuthenticator. With a lookup account, as in Active Directory, its password comes from a Secret through hub.extraEnv and is read in hub.extraConfig.
The login path, with and without LDAP
Who gets into the interface
- Who connects. The team reaches JupyterHub through a cluster node's IP, on the proxy.service.nodePorts.http port. Chart default:
NodePort. - 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) - Proxy. Receives all JupyterHub traffic: it takes the login to the Hub and each user to their own server.
- 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) - 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) - 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) - user-scheduler. The scheduler for the user servers, which the chart starts next to the Hub. Chart default:
on. (tdp-jupyter.scheduling.userScheduler.enabled) - 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) - 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)
Who gets into the interface: Test login admin (default)
- Who connects. The team reaches JupyterHub through a cluster node's IP, on the proxy.service.nodePorts.http port. Chart default:
NodePort. - 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) - Proxy. Receives all JupyterHub traffic: it takes the login to the Hub and each user to their own server.
- 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) - 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) - 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) - user-scheduler. The scheduler for the user servers, which the chart starts next to the Hub. Chart default:
on. (tdp-jupyter.scheduling.userScheduler.enabled) - 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) - 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)
Who gets into the interface: LDAP users
- Who connects. The team reaches JupyterHub through a cluster node's IP, on the proxy.service.nodePorts.http port. Chart default:
NodePort. - 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) - Proxy. Receives all JupyterHub traffic: it takes the login to the Hub and each user to their own server.
- Hub. Authenticates each person and starts a server of their own for each one. With LDAP on, it checks the username and password in the company directory. Chart default:
dummy authenticator · resources in hub.resources. (tdp-jupyter.hub.config.JupyterHub.authenticator_class: ldapauthenticator.LDAPAuthenticator) - 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) - 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) - user-scheduler. The scheduler for the user servers, which the chart starts next to the Hub. Chart default:
on. (tdp-jupyter.scheduling.userScheduler.enabled) - 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) - 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) - LDAP server. The company user directory (LDAP or Active Directory), queried on every login. Chart default:
off. (tdp-jupyter.hub.config.LDAPAuthenticator)
Test login. This is what the chart starts without a values file, and there is nothing to add. Test login: Best suited when JupyterHub is still in testing. To change the temporary password, see scenario 1 of Security - JupyterLab. To turn on LDAP, choose LDAP users above.
LDAP users. Best suited when each person has an account in the directory and the directory accepts the user's direct bind, with no service account.
The values file for this action is in LDAP login. Build it from there and apply it with the procedure below.
Apply the values file
The same command installs and upgrades.
helm upgrade --install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-jupyter \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace --timeout 10m \
-f <VALUES_FILE>
It worked when
If the login fails
The Hub log shows the result of each bind attempt:
kubectl -n <NAMESPACE> logs -l app.kubernetes.io/component=hub
The other fronts, with complete files commented line by line, are in Security - JupyterLab: changing the test login password in scenario 1, Active Directory, with the lookup service account and the Secret with its password, in scenario 3, the identity the pods run with in scenario 4 and the servers' network rules in scenario 5.
Connect the notebooks to a Spark cluster and know what the kernel already includes.
This tab connects the notebooks to a Spark cluster. In Spark, the driver is the process that coordinates an application and splits the work, and the executors are the processes that do that work, on the workers of a cluster. By default, no cluster is needed: Spark runs in local mode (local[*]), with everything inside the user's own server, using its CPU and memory. To distribute the processing, you connect the notebooks to a standalone Spark cluster, installed separately, for example with the tdp-spark chart. The tdpSparkIntegration block generates the Spark configuration that the servers mount. The driver stays on the user's server and starts using the pod's IP, so that the workers can reach it. The notebook kernel also includes the libraries for Trino, S3, Iceberg, Delta Lake, Kafka, ClickHouse and other databases.
The notebooks connected to a Spark cluster
- Who connects. The team reaches JupyterHub through a cluster node's IP, on the proxy.service.nodePorts.http port. Chart default:
NodePort. - 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) - Proxy. Receives all JupyterHub traffic: it takes the login to the Hub and each user to their own server.
- 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) - 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) - 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) - user-scheduler. The scheduler for the user servers, which the chart starts next to the Hub. Chart default:
on. (tdp-jupyter.scheduling.userScheduler.enabled) - 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) - 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) - External Spark cluster. A standalone Spark cluster, installed separately (for example with the tdp-spark chart). The driver runs on the user's server and the executors on the cluster's workers. Chart default:
off: Spark runs locally, on the server itself (local[*]). (tdpSparkIntegration.enabled: true)
The master Service, in the tdp-spark chart, is tdp-spark-master-svc when the Spark release has the chart's name. With another release name, it is <SPARK_RELEASE>-spark-master-svc, or <SPARK_RELEASE>-master-svc when that name already contains spark.
The values file for this action is in Spark cluster. Build it from there and apply it with the procedure below.
Write the values file
Replace the master Service, the namespace and the Spark release with those of your cluster.
If you already have a JupyterHub values file, add the blocks to it. tdpSparkIntegration.configMap.sparkConfig and singleuser.extraEnv are maps: the keys you define are merged with the chart's other defaults. Other Spark properties go in sparkConfig, next to those in the example.
Apply to the release
The same command installs and upgrades.
helm upgrade --install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-jupyter \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace --timeout 10m \
-f <VALUES_FILE>
Restart the user's server
The server only reads the Spark configuration and the environment variables when it starts.
After the helm upgrade, each user with a running server stops and starts their server again: File → Hub Control Panel → Stop My Server, then Start My Server.
Test the Spark session
The session points to the cluster's master and runs a job.
In a notebook with the PySpark Python kernel:
import os
from pyspark.sql import SparkSession
spark = (
SparkSession.builder
.appName("my-notebook")
.master(os.environ.get("SPARK_MASTER_URL", "local[*]"))
.getOrCreate()
)
print("Spark", spark.version, "master", spark.sparkContext.master)
spark.range(5).show()
spark.stop()
Call spark.stop() when you finish, so the cluster releases the executors. With the integration on, the chart also provides a test notebook in a ConfigMap. Download it and upload it through JupyterLab:
kubectl -n <NAMESPACE> get configmap tdp-jupyter-spark-test \
-o jsonpath='{.data.spark-integration-test\.ipynb}' > spark-integration-test.ipynb
It worked when
spark:// address as the master, spark.range(5).show() prints the table and, while the session is open, the application appears in the Spark master interface.If the job does not finish
Check the Spark configuration the chart generated and the variables the server received (the pods are named <RELEASE_NAME>-notebook-<user>), and see When something goes wrong, in Integrations - JupyterLab:
kubectl -n <NAMESPACE> get configmap <RELEASE_NAME>-spark-integration \
-o jsonpath='{.data.spark-defaults\.conf}'
kubectl -n <NAMESPACE> get pods -l component=singleuser-server
kubectl -n <NAMESPACE> exec <POD_NAME> -- env | grep SPARK_
The other fronts are in Integrations - JupyterLab: what the kernel includes, the network opened to the servers and the names outside DNS in scenario 1, the event logs in the History Server in the last step of scenario 2, the queries in Trino in scenario 3 and the lakehouse tables in scenario 4.
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.
- 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.
- 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.
- 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).
- 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).
- 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).
- 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).
- 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.
- 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.
- 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.
- 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).
- 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.
- 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
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:
kubectl -n <NAMESPACE> get pvc -l component=singleuser-storage,app.kubernetes.io/instance=<RELEASE_NAME>
Deleting these PVCs permanently deletes the notebooks and files of all users. Back up what you need first.
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
| Parameter | Description | Chart default |
|---|---|---|
tdp-jupyter.enabledGeneral | Enables the JupyterHub deployment | true |
tdp-jupyter.fullnameOverrideGeneral | Replaces the full name of the resources. Empty, the names follow the release name | null |
openshift.enabledGeneral | Forces OpenShift mode when the automatic detection cannot reach the API | false |
tdp-jupyter.hub.resources.requests.cpuHub | CPU reserved for the Hub | 500m |
tdp-jupyter.hub.resources.requests.memoryHub | Memory reserved for the Hub | 1Gi |
tdp-jupyter.hub.resources.limits.cpuHub | Hub CPU limit | 1000m |
tdp-jupyter.hub.resources.limits.memoryHub | Hub memory limit | 2Gi |
tdp-jupyter.hub.config.JupyterHub.authenticator_classAccess | Authentication class | dummy |
tdp-jupyter.hub.config.DummyAuthenticator.usernameAccess | Default user | admin |
tdp-jupyter.hub.config.DummyAuthenticator.passwordAccess | Default password. Change it before any real use | ChangeMe!T3c |
tdp-jupyter.proxy.service.typeAccess | Proxy Service type | NodePort |
tdp-jupyter.proxy.service.nodePorts.httpAccess | HTTP port on the nodes | 30080 |
tdp-jupyter.proxy.service.nodePorts.httpsAccess | HTTPS port on the nodes | 30443 |
tdp-jupyter.singleuser.cpu.limitServers | CPU limit of each server | 4 |
tdp-jupyter.singleuser.cpu.guaranteeServers | CPU guaranteed for each server | 2 |
tdp-jupyter.singleuser.memory.limitServers | Memory limit of each server | 8G |
tdp-jupyter.singleuser.memory.guaranteeServers | Memory guaranteed for each server | 4G |
tdp-jupyter.singleuser.startTimeoutServers | Seconds that a notebook server may take to start (the first time on each node downloads the notebook image) | 1800 |
TDP-Settings.imagePuller.enabledServers | Preloads the notebook image on every node that can run notebooks | true |
TDP-Settings.imagePuller.nodeSelectorServers | Nodes where the preload runs. They must match the notebook nodes | {} (singleuser.nodeSelector applies) |
TDP-Settings.imagePuller.tolerationsServers | Preload tolerations. They must match those of the notebook nodes | [] |
tdp-jupyter.cull.enabledServers | Shuts down idle notebook servers (idle culler) | true |
tdp-jupyter.cull.timeoutServers | Seconds of inactivity after which the server is shut down | 3600 |
tdp-jupyter.singleuser.storage.capacityServers | Size of each user's volume | 5Gi |
tdp-jupyter.singleuser.storage.dynamic.storageClassServers | StorageClass of the user volumes | null (cluster default) |
tdp-jupyter.singleuser.serviceAccountNameServers | ServiceAccount of the notebook servers, created by the chart | tdp-jupyter-singleuser |
tdp-jupyter.singleuser.networkPolicy.enabledServers | NetworkPolicy of the notebook servers | true |
tdp-jupyter.scheduling.userScheduler.enabledServers | Scheduler for the user servers | true |
tdp-jupyter.hub.db.typeDatabase | Hub database | sqlite-pvc |
TDP-Settings.externalDatabase.enabledDatabase | External database helpers (Jobs that check PostgreSQL and create the database and user) | false |
TDP-Settings.externalDatabase.recreateDatabase | Deletes and recreates the database and user on every install or upgrade | false |
TDP-Settings.externalDatabase.externalSecret.releaseNameDatabase | Secret with the PostgreSQL administrator password (postgres-password key) | tdp-postgresql-auth |
tdpSparkIntegration.enabledSpark | Points the notebooks at an external Spark cluster | false |
tdp-jupyter.singleuser.extraEnv.SPARK_DRIVER_MEMORYSpark | Spark driver memory | 4g |
tdp-jupyter.singleuser.extraEnv.SPARK_EXECUTOR_MEMORYSpark | Spark executor memory | 4g |
TDP-Settings.gateway.ingress.enabledExposure | Renders the Ingress (Route on OpenShift) | false |
TDP-Settings.gateway.gatewayApi.enabledExposure | Renders the Gateway API HTTPRoute | false |
ingress.ingressClassNameExposure | Ingress class | nginx |
ingress.hostsExposure | Ingress hostnames and paths | jupyter.tdp.local, path / |
gatewayApi.gatewayClassNameExposure | GatewayClass of the Gateway created by the chart | "" |
gatewayApi.parentRefsExposure | Gateway the HTTPRoute attaches to | [] |
gatewayApi.jupyter.hostnamesExposure | HTTPRoute hostnames | jupyter.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
Concepts
JupyterHub - Concepts
Hub, proxy, authenticator and spawner, from the login to the open JupyterLab.