|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * installing/installing_aws/uninstalling-cluster-aws.adoc |
| 4 | + |
| 5 | +[id="cco-ccoctl-deleting-sts-resources_{context}"] |
| 6 | += Deleting AWS resources with the Cloud Credential Operator utility |
| 7 | + |
| 8 | +To clean up resources after uninstalling an {product-title} cluster with the Cloud Credential Operator (CCO) in manual mode with STS, you can use the CCO utility (`ccoctl`) to remove the AWS resources that `ccoctl` created during installation. |
| 9 | + |
| 10 | +.Prerequisites |
| 11 | + |
| 12 | +* Extract and prepare the `ccoctl` binary. |
| 13 | +* Install an {product-title} cluster with the CCO in manual mode with STS. |
| 14 | + |
| 15 | +.Procedure |
| 16 | + |
| 17 | +* Delete the AWS resources that `ccoctl` created: |
| 18 | ++ |
| 19 | +[source,terminal,subs="+quotes"] |
| 20 | +---- |
| 21 | +$ ccoctl aws delete --name=__<name>__ --region=__<aws_region>__ |
| 22 | +---- |
| 23 | ++ |
| 24 | +where: |
| 25 | ++ |
| 26 | +** `_<name>_` matches the name used to originally create and tag the cloud resources. |
| 27 | +** `_<aws-region>_` is the AWS region in which cloud resources will be deleted. |
| 28 | ++ |
| 29 | +.Example output: |
| 30 | ++ |
| 31 | +[source,terminal,subs="+quotes"] |
| 32 | +---- |
| 33 | +2021/04/08 17:50:41 Identity Provider object .well-known/openid-configuration deleted from the bucket __<name>__-oidc |
| 34 | +2021/04/08 17:50:42 Identity Provider object keys.json deleted from the bucket __<name>__-oidc |
| 35 | +2021/04/08 17:50:43 Identity Provider bucket __<name>__-oidc deleted |
| 36 | +2021/04/08 17:51:05 Policy __<name>__-openshift-cloud-credential-operator-cloud-credential-o associated with IAM Role __<name>__-openshift-cloud-credential-operator-cloud-credential-o deleted |
| 37 | +2021/04/08 17:51:05 IAM Role __<name>__-openshift-cloud-credential-operator-cloud-credential-o deleted |
| 38 | +2021/04/08 17:51:07 Policy __<name>__-openshift-cluster-csi-drivers-ebs-cloud-credentials associated with IAM Role __<name>__-openshift-cluster-csi-drivers-ebs-cloud-credentials deleted |
| 39 | +2021/04/08 17:51:07 IAM Role __<name>__-openshift-cluster-csi-drivers-ebs-cloud-credentials deleted |
| 40 | +2021/04/08 17:51:08 Policy __<name>__-openshift-image-registry-installer-cloud-credentials associated with IAM Role __<name>__-openshift-image-registry-installer-cloud-credentials deleted |
| 41 | +2021/04/08 17:51:08 IAM Role __<name>__-openshift-image-registry-installer-cloud-credentials deleted |
| 42 | +2021/04/08 17:51:09 Policy __<name>__-openshift-ingress-operator-cloud-credentials associated with IAM Role __<name>__-openshift-ingress-operator-cloud-credentials deleted |
| 43 | +2021/04/08 17:51:10 IAM Role __<name>__-openshift-ingress-operator-cloud-credentials deleted |
| 44 | +2021/04/08 17:51:11 Policy __<name>__-openshift-machine-api-aws-cloud-credentials associated with IAM Role __<name>__-openshift-machine-api-aws-cloud-credentials deleted |
| 45 | +2021/04/08 17:51:11 IAM Role __<name>__-openshift-machine-api-aws-cloud-credentials deleted |
| 46 | +2021/04/08 17:51:39 Identity Provider with ARN arn:aws:iam::__<aws_account_id>__:oidc-provider/__<name>__-oidc.s3.__<aws_region>__.amazonaws.com deleted |
| 47 | +---- |
| 48 | + |
| 49 | +.Verification |
| 50 | + |
| 51 | +You can verify that the resources are deleted by querying AWS. For more information, refer to AWS documentation. |
0 commit comments