|
| 1 | +# Optional — Cleanup |
| 2 | + |
| 3 | +## Goal |
| 4 | +Remove the workshop resources from your OpenShift project in case you want to experiment with something different in the future. |
| 5 | + |
| 6 | +## What gets deleted |
| 7 | +- Model serving deployment and service |
| 8 | +- External route |
| 9 | +- PVC containing the model |
| 10 | +- (Optional) Workbench |
| 11 | + |
| 12 | +## Cleanup commands |
| 13 | + |
| 14 | +### 1. Delete the model serving resources |
| 15 | + |
| 16 | +Delete the deployment and service: |
| 17 | + |
| 18 | +```bash |
| 19 | +oc delete deployment mnist-onnx -n <PROJECT_NAME> |
| 20 | +oc delete service mnist-onnx -n <PROJECT_NAME> |
| 21 | +``` |
| 22 | + |
| 23 | +### 2. Delete the route |
| 24 | + |
| 25 | +```bash |
| 26 | +oc delete route mnist-onnx -n <PROJECT_NAME> |
| 27 | +``` |
| 28 | + |
| 29 | +### 3. Delete the model storage PVC |
| 30 | + |
| 31 | +```bash |
| 32 | +oc delete pvc mnist-model-pvc -n <PROJECT_NAME> |
| 33 | +``` |
| 34 | + |
| 35 | +### 4. (Optional) Delete the Workbench |
| 36 | + |
| 37 | +If you want to remove the Workbench as well: |
| 38 | + |
| 39 | +**Via the OpenShift AI dashboard:** |
| 40 | + |
| 41 | +1. Go to your Data Science Project |
| 42 | +2. Click the **Workbenches** tab |
| 43 | +3. Click the three-dot menu next to `mnist-workbench` |
| 44 | +4. Select **Delete workbench** |
| 45 | + |
| 46 | +**Via CLI:** |
| 47 | + |
| 48 | +```bash |
| 49 | +oc delete notebook mnist-workbench -n <PROJECT_NAME> |
| 50 | +``` |
| 51 | + |
| 52 | +!!! warning "This deletes your work" |
| 53 | + Deleting the Workbench will remove the Jupyter environment and any unsaved notebooks. If you want to keep the notebook, download `mnist_sequential.ipynb` from JupyterLab before deleting the Workbench. |
| 54 | + |
| 55 | +## Verify cleanup |
| 56 | + |
| 57 | +Check that resources are deleted: |
| 58 | + |
| 59 | +```bash |
| 60 | +oc get deployment,service,route,pvc -n <PROJECT_NAME> |
| 61 | +``` |
| 62 | + |
| 63 | +You should no longer see `mnist-onnx` resources listed. |
0 commit comments