This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.Chapter 8. Uninstalling metering
You can remove metering from your OpenShift Container Platform cluster.
Metering does not manage or delete Amazon S3 bucket data. After uninstalling metering, you must manually clean up S3 buckets that were used to store metering data.
8.1. Removing the Metering Operator from your cluster
Remove the Metering Operator from your cluster by following the documentation on deleting Operators from a cluster.
Removing the Metering Operator from your cluster does not remove its CustomResourceDefinitions or managed resources. See the following sections on Uninstalling a metering namespace and Uninstalling metering CustomResourceDefinitions for steps to remove any remaining metering components.
8.2. Uninstalling a metering namespace
Uninstall your metering namespace, for example the openshift-metering
namespace, by removing the MeteringConfig resource and deleting the openshift-metering
namespace.
Prerequisites
- The Metering Operator is removed from your cluster.
Procedure
Remove all resources created by the Metering Operator:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow oc --namespace openshift-metering delete meteringconfig --all
$ oc --namespace openshift-metering delete meteringconfig --all
After the previous step is complete, verify that all Pods in the
openshift-metering
namespace are deleted or are reporting a terminating state:Copy to Clipboard Copied! Toggle word wrap Toggle overflow oc --namespace openshift-metering get pods
$ oc --namespace openshift-metering get pods
Delete the
openshift-metering
namespace:Copy to Clipboard Copied! Toggle word wrap Toggle overflow oc delete namespace openshift-metering
$ oc delete namespace openshift-metering
8.3. Uninstalling metering CustomResourceDefinitions
The metering CustomResourceDefinitions (CRDs) remain in the cluster after the Metering Operator is uninstalled and the openshift-metering
namespace is deleted.
Deleting the metering CRDs disrupts any additional metering installations in other namespaces in your cluster. Ensure that there are no other metering installations before proceeding.
Prerequisites
-
The MeteringConfig custom resource in the
openshift-metering
namespace is deleted. -
The
openshift-metering
namespace is deleted.
Procedure
Delete the remaining metering CRDs:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow oc get crd -o name | grep "metering.openshift.io" | xargs oc delete
$ oc get crd -o name | grep "metering.openshift.io" | xargs oc delete