This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.Chapter 4. Uninstalling OpenShift sandboxed containers
4.1. Uninstalling OpenShift sandboxed containers using the web console
You can uninstall OpenShift sandboxed containers by using the OpenShift Container Platform web console.
4.1.1. Deleting OpenShift sandboxed containers resources
To uninstall OpenShift sandboxed containers, you must first delete the OpenShift sandboxed containers custom resource KataConfig
. This removes and uninstalls the kata
runtime and its related resources from your cluster.
Prerequisites
- You have OpenShift Container Platform 4.8 installed on your cluster.
-
You have access to the cluster as a user with the
cluster-admin
role. You have no running pods that use
kata
as theruntimeClassName
.-
You have installed the OpenShift CLI (
oc
). -
You the command-line JSON processor (
jq
) installed. Verify that you have no running pods that use
kata
as theruntimeClassName
by running the following command:oc get pods -A -o json | jq -r '.items[] | select(.spec.runtimeClassName | test("kata")).metadata.name'
$ oc get pods -A -o json | jq -r '.items[] | select(.spec.runtimeClassName | test("kata")).metadata.name'
Copy to Clipboard Copied!
-
You have installed the OpenShift CLI (
Procedure
-
Delete all pods that use
runtimeClassName
with the value ofkata
. -
From the OpenShift Container Platform web console, select
openshift-sandboxed-containers
from the Projects list. -
Navigate to the Operators
Installed Operators page. - Click OpenShift sandboxed containers.
- Click the OpenShift sandboxed containers Operator tab.
-
Click the scroll-down list in the Operator Details, and then click Delete
KataConfig
. - Click Delete in the confirmation window.
4.1.1.1. Deleting a namespace using the web console
You can delete a namespace by using the OpenShift Container Platform web console.
Prerequisites
- You have OpenShift Container Platform 4.8 installed on your cluster.
-
You have access to the cluster as a user with the
cluster-admin
role.
Procedure
-
Navigate to Administration
Namespaces. -
Locate the
openshift-sandboxed-containers-operator
namespace to delete in the list of namespaces. - On the rightmost side of the namespace listing, select Delete Namespace from the Options menu .
When the Delete Namespace pane opens, enter
openshift-sandboxed-containers-operator
in the field.NoteIf the Delete Namespace option is not available, you do not have permission to delete the namespace.
- Click Delete.
4.1.2. Deleting OpenShift sandboxed containers Operator
You can delete the OpenShift sandboxed containers Operator by deleting the catalog subscription and revoking namespace access to the Operator.
Prerequisites
- You have OpenShift Container Platform 4.8 installed on your cluster.
-
You have access to the cluster as a user with the
cluster-admin
role.
Procedure
-
Navigate to the Operators
OperatorHub page. -
Search for
OpenShift sandboxed containers
and then select the Operator. - Click Uninstall.
-
Delete the
openshift-sandboxed-containers-operator
namespace.
4.2. Uninstalling Kata runtime from the CLI
You can uninstall OpenShift sandboxed containers by using the OpenShift Container Platform command-line interface (CLI).
4.2.1. Deleting OpenShift sandboxed containers resources
You can remove and uninstall the kata
runtime and all its related resources, such as CRI-O config and RuntimeClass
, from your cluster.
Prerequisites
- You have OpenShift Container Platform 4.8 installed on your cluster.
-
You have installed the OpenShift CLI (
oc
). -
You have access to the cluster as a user with the
cluster-admin
role.
Procedure
Delete the
KataConfig
custom resource by running the following command:oc delete kataconfig <KataConfig_CR_Name>
$ oc delete kataconfig <KataConfig_CR_Name>
Copy to Clipboard Copied! Delete the
KataConfig
custom resource definition by running the following command:oc delete crd kataconfigs.kataconfiguration.openshift.io
$ oc delete crd kataconfigs.kataconfiguration.openshift.io
Copy to Clipboard Copied!
The OpenShift sandboxed containers Operator removes all resources that were initially created to enable the runtime on your cluster. After you run the preceding commands, your cluster is restored to the state that it was prior to the installation process. You can now delete the openshift-sandboxed-containers-operator
namespace.
Verification
To verify that the
KataConfig
custom resource is deleted, run the following command:oc get kataconfig <KataConfig_CR_Name>
$ oc get kataconfig <KataConfig_CR_Name>
Copy to Clipboard Copied! Example output
No KataConfig instances exist
No KataConfig instances exist
Copy to Clipboard Copied! To verify that the
KataConfig
custom resource definition is deleted, run the following command:oc get crd kataconfigs.kataconfiguration.openshift.io
$ oc get crd kataconfigs.kataconfiguration.openshift.io
Copy to Clipboard Copied! Example output
Unknown CR KataConfig
Unknown CR KataConfig
Copy to Clipboard Copied!
4.2.2. Deleting OpenShift sandboxed containers Operator
You can delete the OpenShift sandboxed containers Operator from your cluster.
Prerequisites
- You have OpenShift Container Platform 4.8 installed on your cluster.
-
You have installed the OpenShift CLI (
oc
). -
You have access to the cluster as a user with the
cluster-admin
role.
Procedure
Delete the OpenShift sandboxed containers Operator subscription from Operator Lifecyle Manager (OLM) by running the following command:
oc delete subscription openshift-sandboxed-containers-subscription -n openshift-sandboxed-containers-operator
$ oc delete subscription openshift-sandboxed-containers-subscription -n openshift-sandboxed-containers-operator
Copy to Clipboard Copied! Set the cluster service version (CSV) name for OpenShift sandboxed containers as an environment variable by running the following command:
CSV_NAME=$(oc get csv -n openshift-sandboxed-containers-operator -o=custom-columns=:metadata.name)
CSV_NAME=$(oc get csv -n openshift-sandboxed-containers-operator -o=custom-columns=:metadata.name)
Copy to Clipboard Copied! Delete the CSV name for OpenShift sandboxed containers by running the following command:
oc delete csv ${CSV_NAME} -n openshift-sandboxed-containers-operator
$ oc delete csv ${CSV_NAME} -n openshift-sandboxed-containers-operator
Copy to Clipboard Copied!