Uninstalling by running a script
To remove all the deployed capabilities, delete the associated resources and the namespace that you used to install the deployment.
Before you begin
The clean_deployment.py script uses the following utility tools and needs them to be installed on your client machine:
- Kubernetes CLI
- Python
ibm-content-cortex-containersrepository from GitHub
If the script finds that any of these tools are missing on the client, it reports which tools are missing and provides a choice to install the tool.
About this task
Uninstalling and cleaning up the cluster involves several separate high-level tasks.
- Uninstalling the Content Cortex deployment.
- Uninstalling the operators.
- Deleting PVCs and PVs not containing data.
- Deleting secrets and configmaps.
The clean_deployment.py script automates the clean up of the deployment and deletes the operator.
The clean_deployment.py script has two modes.
- deployment
- When you run the script in
deploymentmode, it first checks whether all the required utility tools exist and flags files that are missing. When all the required tools exist and the prerequisites validation passes, it lists all the deployment resources for the selected platform and namespace and deletes them after you confirm. - operator
- When you run the script in
operatormode, it first checks whether all the required utility tools exist and flags files that are missing. The script then deletes the operator for the selected platform and namespace after you confirm.
After you downloaded the ibm-content-cortex-containers repository, change the directory to the ibm-content-cortex-containers/scripts folder.
python3 clean_deployment.py --help
Usage: clean_deployment.py [OPTIONS] COMMAND [ARGS]...
Content Cortex Deployment Cleanup CLI.
Options:
--version Show version and exit.
--install-completion Install completion for the current shell.
--show-completion Show completion for the current shell, to copy it or customize the installation.
--help Show this message and exit.
Customization and Utils:
--silent --no-silent Enable Silent Install (no prompts). [default: no-silent]
--verbose --no-verbose Enable verbose logging. [default: no-verbose]
--dryrun --no-dryrun Perform a dry run [default: no-dryrun]
Commands:
deployment Uninstall FNCM Deployment Only.
operator Uninstall FNCM Operator only.
You can run the script interactively, or supply a configuration file beforehand and run
the script as a silent deployment.python3 clean_deployment.pypython3 clean_deployment.py --silentTo uninstall the Content Cortex deployment, use the following steps.
Procedure
What to do next
If you plan to clean up the Content Cortex data, see the topic Cleaning up Content Cortex.