Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 4. Uninstalling OpenShift sandboxed containers
4.1. Uninstalling OpenShift sandboxed containers using the web console Copier lienLien copié sur presse-papiers!
You can uninstall OpenShift sandboxed containers by using the OpenShift Container Platform web console.
4.1.1. Deleting OpenShift sandboxed containers resources Copier lienLien copié sur presse-papiers!
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-adminrole. You have no running pods that use
kataas 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
kataas theruntimeClassNameby running the following command:$ oc get pods -A -o json | jq -r '.items[] | select(.spec.runtimeClassName | test("kata")).metadata.name'
-
You have installed the OpenShift CLI (
Procedure
-
Delete all pods that use
runtimeClassNamewith the value ofkata. -
From the OpenShift Container Platform web console, select
openshift-sandboxed-containersfrom 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 Copier lienLien copié sur presse-papiers!
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-adminrole.
Procedure
-
Navigate to Administration
Namespaces. -
Locate the
openshift-sandboxed-containers-operatornamespace 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-operatorin 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 Copier lienLien copié sur presse-papiers!
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-adminrole.
Procedure
-
Navigate to the Operators
OperatorHub page. -
Search for
OpenShift sandboxed containersand then select the Operator. - Click Uninstall.
-
Delete the
openshift-sandboxed-containers-operatornamespace.
4.2. Uninstalling Kata runtime from the CLI Copier lienLien copié sur presse-papiers!
You can uninstall OpenShift sandboxed containers by using the OpenShift Container Platform command-line interface (CLI).
4.2.1. Deleting OpenShift sandboxed containers resources Copier lienLien copié sur presse-papiers!
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-adminrole.
Procedure
Delete the
KataConfigcustom resource by running the following command:$ oc delete kataconfig <KataConfig_CR_Name>Delete the
KataConfigcustom 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
KataConfigcustom resource is deleted, run the following command:$ oc get kataconfig <KataConfig_CR_Name>Example output
No KataConfig instances existTo verify that the
KataConfigcustom resource definition is deleted, run the following command:$ oc get crd kataconfigs.kataconfiguration.openshift.ioExample output
Unknown CR KataConfig
4.2.2. Deleting OpenShift sandboxed containers Operator Copier lienLien copié sur presse-papiers!
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-adminrole.
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-operatorSet 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