This topic tells you how to uninstall the AWS Services package from Tanzu Application Platform (commonly known as TAP).
Before uninstalling the package, you must decide whether to retain or delete the existing resources that have been claimed.
Failing to follow one of the following procedures for all of your resources leaves your Tanzu Application Platform in a state that might prevent you from reinstalling the AWS Services package in the future.
If you want to keep a resource:
-
Find the Composite Resource associated with your claim by running:
kubectl get classclaim CLASS-CLAIM-NAME -n CLASS-CLAIM-NAMESPACE -ojsonpath="{.status.provisionedResourceRef}"
Where:
CLASS-CLAIM-NAME
is the name of the claim.CLASS-CLAIM-NAMESPACE
is the namespace the claim is in.
Example output for a PostgreSQL claim:
{"apiVersion":"aws.database.tanzu.vmware.com/v1alpha1","kind":"XPostgreSQLInstance","name":"rds-2-r4mgc"}
-
Find the
Instance
associated with the Composite Resource by running:kubectl get XR-API XR-NAME -ojsonpath="{.spec.resourceRefs}"
Where:
XR-API
is in the formatKIND.APIVERSION
using thekind
andapiVersion
from the output of the previous step.APIVERSION
is the part ofapiVersion
before the/
, for example,aws.database.tanzu.vmware.com
.XR-NAME
is the value ofname
from the output of the previous step.
For example:
$ kubectl get xpostgresqlinstance.aws.database.tanzu.vmware.com rds-2-r4mgc -ojsonpath="{.spec.resourceRefs}" [{"apiVersion":"rds.aws.upbound.io/v1beta1","kind":"Instance","name":"rds-2-r4mgc-zc69h"}]
-
Open the
Instance
resource for editing by running:kubectl edit instance.rds.aws.upbound.io INSTANCE-NAME
Where
INSTANCE-NAME
is the value ofname
from the output of the previous step.For example:
$ kubectl edit instance.rds.aws.upbound.io rds-2-r4mgc-zc69h
-
Change the
Instance
resourcespec.deletionPolicy
field fromDelete
toOrphan
:apiVersion: rds.aws.upbound.io/v1beta1 kind: Instance metadata: # ... spec: deletionPolicy: Orphan # ...
-
Save, and close your editor.
-
Delete the claim by running:
tanzu service class-claim delete CLAIM-NAME
If you want to delete a resource:
-
Delete the corresponding claim by running:
tanzu service class-claim delete CLAIM-NAME
-
Wait for the resource to disappear in the AWS console.
To uninstall the AWS Services package:
-
Confirm that you have the AWS Services package installed by running:
tanzu package installed list -A
-
Search the
PACKAGE-NAME
column of the output foraws.services.tanzu.vmware.com
, and record the name and namespace. -
Uninstall the package:
tanzu package installed delete PACKAGE-NAME -n PACKAGE-NAMESPACE
Where
PACKAGE-NAME
andPACKAGE-NAMESPACE
are the values you recorded in the previous step.For example:
$ tanzu package installed delete aws-services -n tap-install
You must delete the ProviderConfig
you created after installing the AWS Services package to complete
the uninstall.
Crossplane installs a finalizer when the ProviderConfig
is created. To delete the ProviderConfig
you must remove the finalizer.
If you don't do this step, the ProviderConfig
and its related Custom Resource Definition (CRD)
remain in the cluster and prevent you from reinstalling the package in the future.
-
Open the
ProviderConfig
resource for editing by running:kubectl edit providerconfig.aws.upbound.io PROVIDER-CONFIG-NAME
Where
PROVIDER-CONFIG-NAME
is the name you chose for yourProviderConfig
. -
In the
ProviderConfig
:- Record the name and namespace of the
Secret
referenced inspec.credentials
. - Delete the
metadata.finalizers
entry. This allows theProviderConfig
to be deleted.
- Record the name and namespace of the
-
Save, and close your editor. The
ProviderConfig
is automatically deleted. -
Verify the
ProviderConfig
has been removed by running:kubectl get providerconfig.aws.upbound.io
The expected output is an error message like this:
Error from server (NotFound): Unable to list "aws.upbound.io/v1beta1, Resource=providerconfigs": the server could not find the requested resource (get providerconfigs.aws.upbound.io)
-
Delete the
Secret
by running:kubectl delete secret SECRET-NAME -n SECRET-NAMESPACE
Where
SECRET-NAME
andSECRET-NAMESPACE
are the values you recorded earlier.