Workbench images
Outcome: every custom workbench image is triaged (re-import only, or rebuild), code-server workbenches are on 2025.2, every workbench is stopped, and the notebook lint returns PASS or WARNING. Phase 6 of 10 · Before upgrade. Next: Upgrade.
3.x changes how workbenches authenticate (oauth-proxy → kube-rbac-proxy) and how they’re routed (OpenShift Routes → Kubernetes Gateway API with path-based URLs). The operator bumps out-of-the-box images, but custom (BYON) images and old tags need your attention.
Finish all of this before the upgrade. Unmigrated workbenches stay on the 2.x auth layer. Combined with NB_PREFIX routing conflicts, that produces redirect loops or connection failures, especially for RStudio, code-server, and custom images. Workbenches created in 2.25 or earlier are unsupported in 3.5 unless they’re migrated.
Prerequisites
- Remediate the platform complete.
- Users have been told to save their work. Every workbench ends this phase Stopped. If one can’t reach Running, stop or delete it.
- Users know that workbench URLs change after the upgrade. They’ll get new ones from the dashboard, and old bookmarks break.
- Owners of custom images are available. Red Hat doesn’t rebuild custom images. Rebuilding is the application owner’s job.
Procedure
6.1 Find the custom (BYON) images
Expected output: one row per custom image, or No resources found (shape):
Any image built before 3.x (for example, an upstream community Jupyter image) won’t work as-is after the upgrade.
6.2 Triage each custom image
The tag alone doesn’t tell you which case you’re in:
| The image is… | What breaks | What to do |
|---|---|---|
Built FROM the 2025.2 workbench base | Nothing. Gateway NB_PREFIX routing and auth are already built in. | Re-import (6.3), then apply the post-upgrade auth patch (8.4). No rebuild. |
Only tagged 2025.2, on an older base | The tag is cosmetic. It still assumes 2.x routing. | Full rebuild (below). |
| Anything older | Auth and routing | Full rebuild (below). |
Because the tag can’t tell the first two cases apart, check by testing: after the upgrade, start one workbench per unique image and confirm that it routes and authenticates before you trust the rest.
Why 2.x custom images break, and how to rebuild them:
- Authentication. In 2.x, each workbench pod ran an
oauth-proxysidecar. In 3.x, the platform injectskube-rbac-proxy. An image with oauth-proxy configuration built in fights the platform and produces redirect loops. Remove all oauth-proxy binaries, config, and sidecar wiring. The image only needs to serve the notebook on its own port. - Routing. Workbenches now sit behind the Gateway under a path prefix, which is passed in the
NB_PREFIXenvironment variable. The server must serve under that prefix and must not strip it from redirects. For Jupyter, use this entrypoint in place of the upstreamstart-notebook.sh, which ignoresNB_PREFIX:
In the Containerfile: drop any oauth-proxy wiring, COPY the entrypoint in, and set it as the ENTRYPOINT.
Rebuild gotchas.
- Build for the cluster’s architecture:
--platform linux/amd64. An arm64 image fails withexec format error. - Production images should be rebased on UBI9 plus Python from
registry.redhat.io. - NGINX-fronted images (code-server, RStudio) need two extra fixes that Jupyter doesn’t: keep
NB_PREFIXin everyLocation:redirect header, and serve/apias a302rather than an inline rewrite (which avoids 403s).
Background: Introducing the Kubernetes Gateway API for custom image migration.
6.3 Re-register the ImageStream with the rebuilt image
Verify the new tag resolved:
Expected output: an image reference with a digest (shape):
--reference-policy=local pins the ImageStream to the internal registry. If you host the image there, also grant system:image-puller to the workbench ServiceAccount for redhat-ods-applications. See Importing a custom workbench image.
Known issue: oc tag can’t reach the image
Symptom. The ImageStream tag shows an import error.
Diagnosis.
Workaround. Check that the image URL is correct and public, or add a pull secret for the registry to redhat-ods-applications.
Tracker. None.
6.4 Bump out-of-date image tags
| Image | 3.5 requirement |
|---|---|
| Jupyter | 2025.2 recommended. A Jupyter workbench on 2025.1 still lints as compatible. |
| code-server | 2025.2 required |
| RStudio (BuildConfig) | latest required, plus a fresh build after the upgrade |
First check which tags the ImageStream actually offers. The target may not exist on your cluster yet:
Expected output (must include):
Bump every code-server workbench that is on an old tag:
Verify that no code-server workbench is left on 2025.0 or 2025.1:
Expected output:
6.5 Stop every workbench
The notebook controller treats the kubeflow-resource-stopped annotation as “stopped” whenever it’s present. Use a timestamp, not the literal true.
Verify that no workbench has running pods:
Expected output: every RUNNING value is 0 or <none> (shape):
Known issue: a workbench won’t stop, and its pod keeps coming back
Symptom. The pod restarts after you annotate the workbench.
Diagnosis. Check that the annotation actually applied:
Workaround. If it’s empty, re-annotate with a timestamp. Any non-empty value means stopped.
Tracker. None.
6.6 Verify workbench readiness
Inside the pod:
Expected output: the notebook checks report PASS or WARNING, with no FAIL. The report sorts images into compatibility buckets (compatible, custom-needs-verification, incompatible-rebuild-after, and so on) and confirms that every notebook is stopped.
Verification
- The notebook lint has no FAIL.
- Every workbench’s
RUNNINGvalue is0/<none>. - Every custom image is triaged. Rebuilt images are re-imported, and the owners of “rebuild after” images have a date.
Rollback
- Restart a workbench (for example, if the upgrade is postponed): remove the annotation with
oc -n <ns> annotate notebook <name> kubeflow-resource-stopped-. - Revert a tag bump: patch the image back to the previous tag, using the same
oc patch notebook … /spec/template/spec/containers/0/imageform. - ImageStream re-tags are additive. The old tag is still there.