×

Uninstalling OpenShift sandboxed containers using the web console

You can uninstall OpenShift sandboxed containers by using the OpenShift Container Platform web console.

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.9 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'
Procedure
  1. Delete all pods that use runtimeClassName with the value of kata.

  2. From the OpenShift Container Platform web console, select openshift-sandboxed-containers from the Projects list.

  3. Navigate to the OperatorsInstalled Operators page.

  4. Click OpenShift sandboxed containers.

  5. Click the OpenShift sandboxed containers Operator tab.

  6. Click the scroll-down list in the Operator Details, and then click Delete KataConfig.

  7. Click Delete in the confirmation window.

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.9 installed on your cluster.

  • You have access to the cluster as a user with the cluster-admin role.

Procedure
  1. Navigate to AdministrationNamespaces.

  2. Locate the openshift-sandboxed-containers-operator namespace to delete in the list of namespaces.

  3. On the rightmost side of the namespace listing, select Delete Namespace from the Options menu .

  4. 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.

  5. Click Delete.

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.9 installed on your cluster.

  • You have access to the cluster as a user with the cluster-admin role.

Procedure
  1. Navigate to the OperatorsOperatorHub page.

  2. Search for OpenShift sandboxed containers and then select the Operator.

  3. Click Uninstall.

  4. Delete the openshift-sandboxed-containers-operator namespace.

Uninstalling Kata runtime from the CLI

You can uninstall OpenShift sandboxed containers by using the OpenShift Container Platform command-line interface (CLI).

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.9 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
  1. Delete the KataConfig custom resource by running the following command:

    $ oc delete kataconfig <KataConfig_CR_Name>
  2. 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.

Verification
  • To verify that the KataConfig custom resource is deleted, run the following command:

    $ oc get kataconfig <KataConfig_CR_Name>
    Example output
    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
    Example output
    Unknown CR KataConfig

Deleting OpenShift sandboxed containers Operator

You can delete the OpenShift sandboxed containers Operator from your cluster.

Prerequisites
  • You have OpenShift Container Platform 4.9 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
  1. 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
  2. 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)
  3. Delete the CSV name for OpenShift sandboxed containers by running the following command:

    $ oc delete csv ${CSV_NAME} -n openshift-sandboxed-containers-operator