$ oc get pods -A -o json | jq -r '.items[] | select(.spec.runtimeClassName | test("kata")).metadata.name'
You can uninstall OpenShift sandboxed containers by using the OpenShift Container Platform web console.
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.
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 the runtimeClassName
.
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 the runtimeClassName
by running the following command:
$ oc get pods -A -o json | jq -r '.items[] | select(.spec.runtimeClassName | test("kata")).metadata.name'
Delete all pods that use runtimeClassName
with the value of kata
.
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.
You can delete a namespace by using the OpenShift Container Platform web console.
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.
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.
If the Delete Namespace option is not available, you do not have permission to delete the namespace. |
Click Delete.
You can delete the OpenShift sandboxed containers Operator by deleting the catalog subscription and revoking namespace access to the Operator.
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.
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.
You can uninstall OpenShift sandboxed containers by using the OpenShift Container Platform command-line interface (CLI).
You can remove and uninstall the kata
runtime and all its related resources, such as CRI-O config and RuntimeClass
, from your cluster.
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.
Delete the KataConfig
custom resource by running the following command:
$ oc delete kataconfig <KataConfig_CR_Name>
Delete the KataConfig
custom resource definition by running the following command:
$ oc delete crd kataconfigs.kataconfiguration.openshift.io
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.
To verify that the KataConfig
custom resource is deleted, run the following command:
$ oc get kataconfig <KataConfig_CR_Name>
No KataConfig instances exist
To verify that the KataConfig
custom resource definition is deleted, run the following command:
$ oc get crd kataconfigs.kataconfiguration.openshift.io
Unknown CR KataConfig
You can delete the OpenShift sandboxed containers Operator from your cluster.
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.
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
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)
Delete the CSV name for OpenShift sandboxed containers by running the following command:
$ oc delete csv ${CSV_NAME} -n openshift-sandboxed-containers-operator