Create and manage Jupyter notebook workbenches on OpenShift AI with image selection, resource configuration, PVC storage, and lifecycle management. Use when: - "Create a notebook workbench" - "Spin up a Jupyter environment for data science" - "Start / stop my workbench" - "What notebook images are available?" - "Delete a workbench I no longer need" Handles Notebook CR lifecycle: create with configurable images and resources, start/stop, attach storage, and delete with data loss warnings. NOT for deploying models (use /model-deploy). NOT for creating projects (use /ds-project-setup). NOT for managing pipelines (use /pipeline-manage).
70
86%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Create and manage Jupyter notebook workbenches on Red Hat OpenShift AI. Handles the full workbench lifecycle: listing available notebook images, creating Notebook CRs with configurable CPU/memory/GPU resources, provisioning PVC storage, starting and stopping workbenches, and deleting them with proper data loss warnings.
Required MCP Server: openshift (OpenShift MCP Server)
Required MCP Tools (from openshift):
resources_get - Inspect Notebook CR details, ImageStream details, check node GPU availabilityresources_list - List ImageStreams for notebook image discovery, list PVCs, list Notebooksresources_create_or_update - Create/update Notebook CR, PVC, patch annotations for start/stop (OpenShift fallback)resources_delete - Delete Notebook CR, PVC (OpenShift fallback for delete operations)events_list - Check pod events when workbench is stuckpods_list - Check workbench pod statusPreferred MCP Server: rhoai (RHOAI MCP Server) — used when available, automatic OpenShift fallback on failure
Preferred MCP Tools (from rhoai):
list_data_science_projects - Validate namespace is an RHOAI Data Science Projectlist_workbenches - List existing workbenches in a projectget_workbench - Get workbench details (status, image, resources, storage)create_workbench - Create a new Notebook CR with image, resources, and storagestart_workbench - Start a stopped workbench. Known issue: may fail with "Unsupported Media Type" — use annotation patch fallback.stop_workbench - Stop a running workbench. Known issue: may fail — use annotation patch fallback.delete_workbench - Delete a workbench. Known issue: may return "Dangerous operations are disabled" — use resources_delete fallback.get_workbench_url - Get the OAuth-protected notebook URLlist_storage - List PVCs in the projectcreate_storage - Create a PVC for workbench storagedelete_storage - Delete a PVClist_data_connections - List data connections available to attachCommon prerequisites (KUBECONFIG, OpenShift+RHOAI cluster, verification protocol): See skill-conventions.md.
Fallback templates: See openshift-fallback-templates.md for OpenShift YAML templates used when RHOAI tools are unavailable.
Important: Do NOT use list_notebook_images (from rhoai) — it returns incorrect hardcoded image names that cause broken deployments. Always use the ImageStream lookup pattern described below.
Additional cluster requirements:
opendatahub.io/dashboard: "true")Use this skill when you need to:
Do NOT use this skill when:
/ds-project-setup)/model-deploy)/pipeline-manage)/debug-inference)Ask the user what they want to do:
Ask for the target namespace (required for all operations).
Validate namespace is a Data Science Project:
MCP Tool: list_data_science_projects (from rhoai)
Parameters: none
Verify the user-specified namespace appears in the project list. If not, report: "Namespace [name] is not an RHOAI Data Science Project. Use /ds-project-setup to create one."
Route to the appropriate sub-workflow:
list_workbenches (fallback: resources_list from openshift), display results, doneNotebook Image Discovery (replaces list_notebook_images which returns incorrect names):
Step 1: List notebook ImageStreams:
MCP Tool: resources_list (from openshift)
apiVersion: image.openshift.io/v1, kind: ImageStream, namespace: redhat-ods-applications, labelSelector: opendatahub.io/notebook-image=trueStep 2: For each ImageStream, get details:
MCP Tool: resources_get (from openshift)
Extract from each ImageStream:
.metadata.name — the actual image name (e.g., pytorch, NOT jupyter-pytorch-notebook).spec.tags[].name — available tags (e.g., 2024.1).spec.tags[].annotations["opendatahub.io/notebook-image-name"] — display name.spec.tags[].from.name — the full image reference to use in the Notebook CRPresent to user as a selection table showing Image Name, Tag, and Display Name.
See openshift-fallback-templates.md for the complete pattern.
Present available images in a table:
| Image Name | Tag | Display Name |
|---|---|---|
| [name] | [tag] | [display_name] |
Ask the user for workbench configuration:
Display configuration table:
| Setting | Value |
|---|---|
| Workbench name | [name] |
| Namespace | [namespace] |
| Image | [image_name] |
| CPU | [cpu] cores |
| Memory | [memory] |
| Storage | [storage_size] |
| GPU | [gpu_count or none] |
WAIT for user to confirm or modify the configuration.
Check existing storage:
MCP Tool: list_storage (from rhoai)
Parameters:
namespace: target namespace - REQUIREDIf rhoai unavailable or returns error: Use resources_list/resources_create_or_update/resources_delete (from openshift) for PersistentVolumeClaim resources. See openshift-fallback-templates.md.
If a suitable PVC already exists, ask user if they want to reuse it or create a new one.
Create PVC for workbench storage:
MCP Tool: create_storage (from rhoai)
Parameters:
namespace: target namespace - REQUIREDname: PVC name (default: [workbench-name]-storage) - REQUIREDsize: storage size from Step 2 (e.g., "20Gi") - REQUIREDaccess_mode: "ReadWriteOnce" - REQUIRED (default, single-pod access)If rhoai unavailable or returns error: Use resources_list/resources_create_or_update/resources_delete (from openshift) for PersistentVolumeClaim resources. See openshift-fallback-templates.md.
Verify creation:
MCP Tool: list_storage (from rhoai)
Parameters:
namespace: target namespace - REQUIREDConfirm the PVC appears and is in Bound or Pending state.
Error Handling:
[name] already exists. Reuse it or create with a different name?"MCP Tool: create_workbench (from rhoai)
Parameters:
namespace: target namespace - REQUIREDname: workbench name from Step 2 - REQUIREDimage: selected notebook image name from Step 2 - REQUIREDcpu: CPU cores (e.g., "2") - REQUIREDmemory: memory allocation (e.g., "8Gi") - REQUIREDstorage_size: PVC storage size (e.g., "20Gi") - REQUIREDMonitor workbench startup by polling status:
MCP Tool: get_workbench (from rhoai)
Parameters:
namespace: target namespace - REQUIREDname: workbench name - REQUIREDCheck until status shows the workbench is running. If status does not become ready within a reasonable polling window (3-4 checks), proceed to report current status and advise user to check back.
Get notebook URL:
MCP Tool: get_workbench_url (from rhoai)
Parameters:
namespace: target namespace - REQUIREDname: workbench name - REQUIREDError Handling:
[name] already exists. Choose a different name or manage the existing one."Report to user:
| Detail | Value |
|---|---|
| Workbench | [name] |
| Status | [Running / Starting] |
| Image | [image] |
| Resources | [cpu] CPU, [memory] RAM, [gpu] GPU |
| Storage | [storage_size] |
| URL | [notebook_url] |
Suggest next steps:
/ds-project-setup to add data connections to the project/model-deploy when ready to deploy a trained modelList workbenches to identify the target:
MCP Tool: list_workbenches (from rhoai)
Parameters:
namespace: target namespace - REQUIREDIf rhoai unavailable or returns error: Use resources_list (from openshift) with apiVersion: kubeflow.org/v1, kind: Notebook, namespace: [namespace].
If user did not specify a workbench name, present the list and ask which one to manage.
For Start:
Confirm the workbench is currently stopped. If already running, report its URL and current status.
MCP Tool: start_workbench (from rhoai)
Parameters:
namespace: target namespace - REQUIREDname: workbench name - REQUIREDIf rhoai unavailable or returns error (e.g., "Unsupported Media Type"): Patch the Notebook CR annotation via resources_create_or_update (from openshift) to remove the kubeflow-resource-stopped annotation (set to null or empty). See openshift-fallback-templates.md.
MCP Tool: get_workbench_url (from rhoai)
Parameters:
namespace: target namespace - REQUIREDname: workbench name - REQUIREDOutput to user: "Workbench [name] started. Access it at: [url]"
For Stop:
WAIT for user confirmation: "Workbench [name] is currently running. Stopping it will interrupt any active sessions. Unsaved work in the notebook may be lost. Proceed? (yes/no)"
MCP Tool: stop_workbench (from rhoai)
Parameters:
namespace: target namespace - REQUIREDname: workbench name - REQUIREDIf rhoai unavailable or returns error: Patch the Notebook CR via resources_create_or_update (from openshift) to set annotation kubeflow-resource-stopped: "true". See openshift-fallback-templates.md.
Verify state change:
MCP Tool: get_workbench (from rhoai)
Parameters:
namespace: target namespace - REQUIREDname: workbench name - REQUIREDIf rhoai unavailable or returns error: Use resources_get (from openshift) with apiVersion: kubeflow.org/v1, kind: Notebook, name: [name], namespace: [namespace].
Output to user: "Workbench [name] stopped. Persistent storage is preserved. Use /workbench-manage to start it again."
Error Handling:
Get workbench details:
MCP Tool: get_workbench (from rhoai)
Parameters:
namespace: target namespace - REQUIREDname: workbench name - REQUIREDIf rhoai unavailable or returns error: Use resources_get (from openshift) with apiVersion: kubeflow.org/v1, kind: Notebook, name: [name], namespace: [namespace].
Display workbench details and data loss warning:
| Detail | Value |
|---|---|
| Workbench | [name] |
| Status | [Running / Stopped] |
| Image | [image] |
| Storage | [pvc_name] ([size]) |
WARNING: Deleting this workbench will remove the Notebook CR. If the workbench is running, it will be stopped first. Any unsaved notebook work will be lost.
Ask: "Delete workbench [name]? This action cannot be undone. (yes/no)"
WAIT for explicit confirmation.
MCP Tool: delete_workbench (from rhoai)
Parameters:
namespace: target namespace - REQUIREDname: workbench name - REQUIREDIf rhoai unavailable or returns error (e.g., "Dangerous operations are disabled"): Use resources_delete (from openshift) with apiVersion: kubeflow.org/v1, kind: Notebook, name: [workbench-name], namespace: [namespace]. WAIT for user confirmation before deleting — warn about data loss.
Associated storage cleanup (separate confirmation):
Ask: "The PVC [pvc_name] ([size]) associated with this workbench still exists. Delete it too? WARNING: All data in this volume will be permanently lost. (yes/no)"
WAIT for explicit confirmation.
If user confirms PVC deletion:
MCP Tool: delete_storage (from rhoai)
Parameters:
namespace: target namespace - REQUIREDname: PVC name - REQUIREDIf rhoai unavailable or returns error: Use resources_list/resources_create_or_update/resources_delete (from openshift) for PersistentVolumeClaim resources. See openshift-fallback-templates.md.
If user declines, report: "PVC [pvc_name] preserved. It can be reattached to a new workbench."
Output to user: "Workbench [name] deleted. [PVC deleted / PVC preserved]."
For common issues (GPU scheduling, OOMKilled, image pull errors, RBAC), see common-issues.md.
Error: create_workbench fails with image not found or image reference is invalid
Cause: The selected image name does not match any available notebook image, or the image registry is unreachable.
Solution:
Error: Workbench pod stuck in ImagePullBackOff after creation
Cause: The list_notebook_images tool returned incorrect image names (e.g., jupyter-pytorch-notebook instead of the actual ImageStream name pytorch).
Solution: This tool has been replaced. Use the ImageStream lookup pattern via OpenShift MCP to discover correct image names. Patch the stuck Notebook CR with the correct image reference from the ImageStream, then delete the stuck pod to force rescheduling.
See common-issues.md for details.
Error: PVC remains in Pending state, workbench cannot start
Cause: The default StorageClass does not support the requested access mode, or no StorageClass is configured.
Solution:
resources_get (from openshift) on storageclasses.storage.k8s.ioReadWriteOnce access mode (most widely supported)ReadWriteMany is required, verify the StorageClass supports it (e.g., NFS, CephFS)Error: Workbench status remains in a starting/initializing state for an extended period
Cause: Pod scheduling issues, image pull errors, or resource constraints.
Solution:
events_list (from openshift) filtered by namespace to check for pod eventsImagePullBackOff: Image registry unreachable or credentials missingInsufficient cpu/memory: Reduce resource requests or free up cluster resourcesFailedScheduling: Node taints or affinity rules preventing schedulingSee Prerequisites for the complete list of required and optional MCP tools.
/ds-project-setup - Create a Data Science Project (prerequisite: namespace must exist)/model-deploy - Deploy a trained model from the workbench/ai-observability - Check GPU inventory before requesting GPU workbenchesUser: "Create a PyTorch notebook workbench in my ml-team project with 4 CPUs and a GPU"
Skill response: Validates ml-team is an RHOAI project, lists available notebook images, presents configuration table (PyTorch image, 4 CPU, 8Gi memory, 1 GPU, 20Gi storage), provisions PVC storage, creates workbench, monitors startup, and returns the notebook URL.
See skill-conventions.md for general HITL and security conventions.
Skill-specific checkpoints:
e46c4fa
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.