$ oc get pods -A -o json | jq -r '.items[] | select(.spec.runtimeClassName == "kata").metadata.name'
KataConfig
custom resource definition using the web consoleYou can uninstall OpenShift sandboxed containers by using either the OpenShift Container Platform web console or OpenShift cli (oc
). Both procedures are explained below.
Use the OpenShift Container Platform web console to delete the relevant OpenShift sandboxed containers pods, resources, and namespace.
To uninstall OpenShift sandboxed containers, you must first delete all running pods that use kata
as the runtimeClass
.
You have OpenShift Container Platform 4.11 installed on your cluster.
You have access to the cluster as a user with the cluster-admin
role.
You have a list of the pods that use kata
as the runtimeClass
.
From the Administrator perspective, navigate to Workloads → Pods.
Search for the pod that you want to delete using the Search by name field.
click the pod name to open it.
On the Details page, check that kata
is displayed for Runtime class.
click the Actions menu and select Delete Pod.
click Delete in the confirmation window.
You can retrieve a list of running pods that use kata
as the runtimeClass
from the OpenShift cli. For details, see Deleting OpenShift sandboxed containers pods.
Deleting the KataConfig
custom resource (CR) removes and uninstalls the kata
runtime and its related resources from your cluster.
Deleting the
|
You have OpenShift Container Platform 4.11 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 runtimeClass
.
From the Administrator perspective, navigate to Operators → Installed Operators.
Search for the OpenShift sandboxed containers Operator using the Search by name field.
click the Operator to open it, and then select the KataConfig tab.
click the Options menu for the KataConfig
resource, and then select Delete KataConfig
.
click Delete in the confirmation window.
Wait for the kata
runtime and resources to uninstall and for the worker nodes to reboot before continuing to the next step.
Deleting the OpenShift sandboxed containers Operator removes the catalog subscription, Operator group, and cluster service version (CSV) for that Operator.
You have OpenShift Container Platform 4.11 installed on your cluster.
You have access to the cluster as a user with the cluster-admin
role.
From the Administrator perspective, navigate to Operators → Installed Operators.
Search for the OpenShift sandboxed containers Operator using the Search by name field.
click the Options menu for the Operator and select Uninstall Operator.
click Uninstall in the confirmation window.
After you run the preceding commands, your cluster is restored to the state that it was prior to the installation process. You can now revoke namespace access to the Operator by deleting the openshift-sandboxed-containers-operator
namespace.
You have OpenShift Container Platform 4.11 installed on your cluster.
You have access to the cluster as a user with the cluster-admin
role.
From the Administrator perspective, navigate to Administration → Namespaces.
Search for the openshift-sandboxed-containers-operator
namespace using the Search by name field.
click the Options menu for the namespace and select Delete Namespace.
If the Delete Namespace option is not available, you do not have permission to delete the namespace. |
In the Delete Namespace pane, enter openshift-sandboxed-containers-operator
and click Delete.
click Delete.
KataConfig
custom resource definition using the web consoleThe KataConfig
custom resource definition (CRD) lets you define the KataConfig
CR. To complete the uninstall process, delete the KataConfig
CRD from your cluster.
You have OpenShift Container Platform 4.11 installed on your cluster.
You have access to the cluster as a user with the cluster-admin
role.
You have removed the KataConfig
CR from your cluster.
You have removed the OpenShift sandboxed containers Operator from your cluster.
From the Administrator perspective, navigate to Administration → CustomResourceDefinitions.
Search for KataConfig
using the Search by name field.
click the Options menu for the KataConfig
CRD, and then select Delete CustomResourceDefinition.
click Delete in the confirmation window.
Wait for the KataConfig
CRD to disappear from the list. This can take several minutes.
You can uninstall OpenShift sandboxed containers by using the OpenShift Container Platform command-line interface (cli). Follow the steps below in the order that they are presented.
To uninstall OpenShift sandboxed containers, you must first delete all running pods that use kata
as the runtimeClass
.
You have installed the OpenShift cli (oc
).
You have the command-line JSON processor (jq
) installed.
Search for pods that use kata
as the runtimeClass
by running the following command:
$ oc get pods -A -o json | jq -r '.items[] | select(.spec.runtimeClassName == "kata").metadata.name'
To delete each pod, run the following command:
$ oc delete pod <pod-name>
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.11 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.
Deleting the
|
Delete the KataConfig
custom resource by running the following command:
$ oc delete kataconfig <KataConfig_CR_Name>
The OpenShift sandboxed containers Operator removes all resources that were initially created to enable the runtime on your cluster.
During deletion, the cli stops responding until all worker nodes reboot. Wait for the process to complete before performing the verification or continuing to the next procedure. |
To verify that the KataConfig
custom resource is deleted, run the following command:
$ oc get kataconfig <KataConfig_CR_Name>
No KataConfig instances exist
Remove the OpenShift sandboxed containers Operator from your cluster by deleting the Operator subscription, Operator group, cluster service version (CSV), and namespace.
You have OpenShift Container Platform 4.10 installed on your cluster.
You have installed the OpenShift cli (oc
).
You have installed the comand-line JSON processor (jq
).
You have access to the cluster as a user with the cluster-admin
role.
Fetch the cluster service version (CSV) name for OpenShift sandboxed containers from the subscription by running the following command:
CSV_NAME=$(oc get csv -n openshift-sandboxed-containers-operator -o=custom-columns=:metadata.name)
Delete the OpenShift sandboxed containers Operator subscription from Operator Lifecyle Manager (OLM) by running the following command:
$ oc delete subscription sandboxed-containers-operator -n openshift-sandboxed-containers-operator
Delete the CSV name for OpenShift sandboxed containers by running the following command:
$ oc delete csv ${CSV_NAME} -n openshift-sandboxed-containers-operator
Fetch the OpenShift sandboxed containers Operator group name by running the following command:
$ OG_NAME=$(oc get operatorgroup -n openshift-sandboxed-containers-operator -o=jsonpath={..name})
Delete the OpenShift sandboxed containers Operator group name by running the following command:
$ oc delete operatorgroup ${OG_NAME} -n openshift-sandboxed-containers-operator
Delete the OpenShift sandboxed containers namespace by running the following command:
$ oc delete namespace openshift-sandboxed-containers-operator
KataConfig
custom resource definition using the cliThe KataConfig
custom resource definition (CRD) lets you define the KataConfig
CR. Delete the KataConfig
CRD from your cluster.
You have installed the OpenShift cli (oc
).
You have access to the cluster as a user with the cluster-admin
role.
You have removed the KataConfig
CR from your cluster.
You have removed the OpenShift sandboxed containers Operator from your cluster.
Delete the KataConfig
CRD by running the following command:
$ oc delete crd kataconfigs.kataconfiguration.openshift.io
To verify that the KataConfig
CRD is deleted, run the following command:
$ oc get crd kataconfigs.kataconfiguration.openshift.io
Unknown CR KataConfig