Closed Milstein closed 1 month ago
Goal:
Basics: Refer to this guide for detailed instructions.
Steps:
Log in to your terminal:
oc login --token=sha256~<your token> --server=https://api.shift.nerc.mghpcc.org:6443
Switch to your project:
oc project <namespace>
Confirm the project:
oc project
List all resources:
oc get all
oc get all -oname
Check quotas:
oc get quota
oc describe quota <your_project_quota_name>
Check for labels:
oc get all --show-labels
Delete notebooks (preferably via the NERC web console by the owner/PI):
oc delete notebook --all -n <namespace>
WARNING: --all
deletes everything. Ensure you are in the correct project/namespace. Use -n <namespace>
to specify.
To delete resources with labels (preferred) and don't want to use --all:
oc delete all -l <label>
Full erase command (use with caution):
oc delete pod,deployment,pvc,route,service,build,buildconfig,statefulset,replicaset,cronjob,imagestream,revision,configuration,notebook,service.serving,route.serving -n <namespace> --all
Verify resources:
oc get all -oname
oc describe quota <your_project_quota_name>
Reduce project limits in ColdFront.
Verify resources again:
oc get all -oname
oc describe quota <your_project_quota_name>
Use these code snippets for rhods-Notebooks:
oc project rhods-notebooks
oc delete notebook --all -n rhods-notebooks
oc delete pod,deployment,pvc,route,service,build,buildconfig,statefulset,replicaset,cronjob,imagestream,revision,configuration,notebook,service.serving,route.serving -n rhods-notebooks --all
[x] CS 506 containers - PI: Lance Galletti
[x] Write a runbook for the process