Questo contenuto non è disponibile nella lingua selezionata.
Chapter 4. Uninstalling confidential containers
You uninstall confidential containers by uninstalling OpenShift sandboxed containers and its components on your workload cluster.
Then, you uninstall the Red Hat build of Trustee Operator and its components. See Uninstalling Red Hat build of Trustee for details.
You uninstall OpenShift sandboxed containers by performing the following tasks:
- Delete the workload pods.
-
Delete the
KataConfigcustom resource (CR). - Uninstall the OpenShift sandboxed containers Operator.
-
Delete the
KataConfigcustom resource definition (CRD).
You must delete the workload pods before deleting the KataConfig CR. The pod names usually have the prefix podvm and custom tags, if provided. If you deployed OpenShift sandboxed containers on a cloud provider and any resources remain after following these procedures, you might receive an unexpected bill for those resources from your cloud provider. Once you complete uninstalling OpenShift sandboxed containers on a cloud provider, check the cloud provider console to ensure that the procedures deleted all of the resources.
4.1. Deleting workload pods Copia collegamentoCollegamento copiato negli appunti!
You can delete the OpenShift sandboxed containers workload pods by using the CLI.
Prerequisites
-
You have the JSON processor (
jq) utility installed.
Procedure
Search for the pods by running the following command:
oc get pods -A -o json | jq -r '.items[] | \ select(.spec.runtimeClassName == "<runtime>").metadata.name'
$ oc get pods -A -o json | jq -r '.items[] | \ select(.spec.runtimeClassName == "<runtime>").metadata.name'Copy to Clipboard Copied! Toggle word wrap Toggle overflow Delete each pod by running the following command:
oc delete pod <pod>
$ oc delete pod <pod>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
When uninstalling OpenShift sandboxed containers deployed using a cloud provider, you must delete all of the pods. Any remaining pod resources might result in an unexpected bill from your cloud provider.
4.2. Deleting the KataConfig custom resource Copia collegamentoCollegamento copiato negli appunti!
You delete the KataConfig custom resource (CR) by using the command line.
Procedure
Delete the
KataConfigCR by running the following command:oc delete kataconfig example-kataconfig
$ oc delete kataconfig example-kataconfigCopy to Clipboard Copied! Toggle word wrap Toggle overflow Verify the CR removal by running the following command:
oc get kataconfig example-kataconfig
$ oc get kataconfig example-kataconfigCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
No example-kataconfig instances exist
No example-kataconfig instances existCopy to Clipboard Copied! Toggle word wrap Toggle overflow
You must ensure that all pods are deleted. Any remaining pod resources might result in an unexpected bill from your cloud provider.
4.3. Uninstalling the OpenShift sandboxed containers Operator Copia collegamentoCollegamento copiato negli appunti!
You uninstall the OpenShift sandboxed containers Operator by using the command line.
Procedure
Delete the subscription by running the following command:
oc delete subscription sandboxed-containers-operator -n openshift-sandboxed-containers-operator
$ oc delete subscription sandboxed-containers-operator -n openshift-sandboxed-containers-operatorCopy to Clipboard Copied! Toggle word wrap Toggle overflow Delete the namespace by running the following command:
oc delete namespace openshift-sandboxed-containers-operator
$ oc delete namespace openshift-sandboxed-containers-operatorCopy to Clipboard Copied! Toggle word wrap Toggle overflow
4.4. Deleting the KataConfig CRD Copia collegamentoCollegamento copiato negli appunti!
You delete the KataConfig custom resource definition (CRD) by using the command line.
Prerequisites
-
You have deleted the
KataConfigcustom resource. - You have uninstalled the OpenShift sandboxed containers Operator.
Procedure
Delete the
KataConfigCRD by running the following command:oc delete crd kataconfigs.kataconfiguration.openshift.io
$ oc delete crd kataconfigs.kataconfiguration.openshift.ioCopy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the CRD was deleted by running the following command:
oc get crd kataconfigs.kataconfiguration.openshift.io
$ oc get crd kataconfigs.kataconfiguration.openshift.ioCopy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
Unknown CRD kataconfigs.kataconfiguration.openshift.io
Unknown CRD kataconfigs.kataconfiguration.openshift.ioCopy to Clipboard Copied! Toggle word wrap Toggle overflow