Skip to content

Commit ebdd26f

Browse files
committed
add optional cleanup page
1 parent e6aee2c commit ebdd26f

2 files changed

Lines changed: 64 additions & 0 deletions

File tree

docs/lab/07-cleanup.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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.

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ nav:
3737
- Step 3 - Deploy with OVMS: lab/04-serve.md
3838
- Step 4 - Test Inference: lab/05-test.md
3939
- Optional - External Curl Test: lab/06-external-test.md
40+
- Optional - Cleanup: lab/07-cleanup.md
4041
- Troubleshooting: troubleshooting.md
4142
- Reference:
4243
- Repo assets: reference/repo-assets.md

0 commit comments

Comments
 (0)