Chapter 5. Uninstall
You uninstall OpenShift sandboxed containers by deleting the workload pods, uninstalling the OpenShift sandboxed containers Operator, and deleting its resources.
You perform the following tasks:
Delete pods that use the
kata-remoteruntime class.ImportantYou must delete the workload pods before you delete the
KataConfigCR. The pod names usually have the prefixpodvmand custom tags, if provided.-
Delete the
KataConfigcustom resource (CR). - Uninstall the OpenShift sandboxed containers Operator.
-
Delete the
KataConfigcustom resource definition (CRD).
5.1. Deleting workload pods Copy linkLink copied to clipboard!
You must delete your workload pods. The pod names usually have the prefix podvm and custom tags, if provided.
Prerequisites
-
You have installed the
jqutility.
Procedure
Search for the pods by running the following command:
$ oc get pods -A -o json | jq -r '.items[] | \ select(.spec.runtimeClassName == "kata-remote").metadata.name'Delete each pod by running the following command:
$ oc delete pod <pod>
5.2. Deleting the KataConfig custom resource Copy linkLink copied to clipboard!
You must delete the KataConfig custom resource (CR).
Deleting the KataConfig CR automatically reboots the worker nodes. Reboot can take from 10 to 60 minutes. The following factors can affect the reboot time:
- A larger OpenShift Container Platform deployment with a greater number of worker nodes.
- Activation of the BIOS and Diagnostics utility.
- Deployment on a hard drive rather than an SSD.
- Deployment on physical nodes such as bare metal, rather than on virtual nodes.
- A slow CPU and network.
Prerequisites
-
You have deleted all pods that use the
kata-remoteruntime class.
Procedure
Delete the
KataConfigCR by running the following command:$ oc delete kataconfig example-kataconfigThe OpenShift sandboxed containers Operator removes all resources that were initially created to enable the runtime on your cluster.
ImportantWhen you delete the
KataConfigCR, the CLI stops responding until all worker nodes reboot. You must wait for the deletion process to complete before performing the verification.Verify the CR removal by running the following command:
$ oc get kataconfig example-kataconfigExample output
No example-kataconfig instances exist
5.3. Uninstalling the OpenShift sandboxed containers Operator Copy linkLink copied to clipboard!
You uninstall the OpenShift sandboxed containers Operator by using the command line.
Prerequisites
-
You have deleted all pods with the
kata-remoteruntime class. -
You have deleted the
KataConfigcustom resource.
Procedure
Delete the subscription by running the following command:
$ oc delete subscription OpenShift sandboxed containers Operator -n openshift-sandboxed-containers-operatorDelete the namespace by running the following command:
$ oc delete namespace openshift-sandboxed-containers-operator
5.4. Deleting the KataConfig CRD Copy linkLink copied to clipboard!
You must delete the KataConfig custom resource definition (CRD).
Prerequisites
-
You have deleted the
KataConfigcustom resource. - You have uninstalled the OpenShift sandboxed containers Operator.
Procedure
Delete the
KataConfigCRD by running the following command:$ oc delete crd kataconfigs.kataconfiguration.openshift.ioVerify that the CRD was deleted by running the following command:
$ oc get crd kataconfigs.kataconfiguration.openshift.ioExample output
Unknown CRD kataconfigs.kataconfiguration.openshift.io