Uninstalling metering

Metering is a deprecated feature. Deprecated functionality is still included in OKD and continues to be supported; however, it will be removed in a future release of this product and is not recommended for new deployments.

For the most recent list of major functionality that has been deprecated or removed within OKD, refer to the Deprecated and removed features section of the OKD release notes.

You can remove metering from your OKD 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.

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 custom resource definitions or managed resources. See the following sections on Uninstalling a metering namespace and Uninstalling metering custom resource definitions for steps to remove any remaining metering components.

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

  1. Remove all resources created by the Metering Operator:

    1. $ oc --namespace openshift-metering delete meteringconfig --all
  2. After the previous step is complete, verify that all pods in the openshift-metering namespace are deleted or are reporting a terminating state:

    1. $ oc --namespace openshift-metering get pods
  3. Delete the openshift-metering namespace:

    1. $ oc delete namespace openshift-metering

Uninstalling metering custom resource definitions

The metering custom resource definitions (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:

    1. $ oc get crd -o name | grep "metering.openshift.io" | xargs oc delete