Skip to content

Commit

Permalink
added missing kubernetes objects to decommission
Browse files Browse the repository at this point in the history
  • Loading branch information
Milstein committed Aug 13, 2024
1 parent 6a1d473 commit 64c5f49
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions docs/openshift/decommission/decommission-openshift-resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,16 @@ shown below:
oc project
Using project "<your_openshift_project_to_decommission>" on server "https://api.shift.nerc.mghpcc.org:6443".

!!! tip "Important Note: Best Practice for Specifying Namespace in `oc` Commands."

The best practice is to specify the namespace in each `oc` command using the
`-n` option, e.g., `-n <your_openshift_project_to_decommission>`. This ensures
that your commands are always executed in the intended project, minimizing
the risk of affecting the wrong resources.

For example, the `oc get all` command can also be executed by specifying the
namespace using the `-n` option, like this: `oc get all -n <your_openshift_project_to_decommission>`.

Please review all resources currently being used by your project by running
`oc get all`, as shown below:

Expand Down Expand Up @@ -179,7 +189,9 @@ Please review all resources currently being used by your project by running
Run the `oc delete` command to delete all resource objects specified as
parameters after `--all` within your selected project (namespace).

oc delete pod,deployment,pvc,route,service,build,buildconfig,statefulset,replicaset,cronjob,imagestream,revision,configuration,notebook --all
oc delete pod,deployment,deploymentconfig,pvc,route,service,build,buildconfig,
statefulset,replicaset,replicationcontroller,job,cronjob,imagestream,revision,
configuration,notebook --all

!!! danger "Danger"

Expand All @@ -188,7 +200,10 @@ parameters after `--all` within your selected project (namespace).
delete all resources in the specified project.

Always ensure that you are targeting the correct project (namespace) when using
this command to avoid unintentional deletion of resources.
this command to avoid unintentional deletion of resources. If you're unsure
which namespace you're currently in, run the oc project command to display
the current project. To be safe, you can also specify the namespace in all
`oc` commands by using the `-n` option, e.g., `-n <your_openshift_project_to_decommission>`.

Make sure to backup any important data or configurations before executing this
command to prevent accidental data loss.
Expand Down

0 comments on commit 64c5f49

Please sign in to comment.