You can individually uninstall API Connect subsystems that have been deployed on
Kubernetes.
About this task
- To delete the API Connect deployment in a
Kubernetes runtime environment, you must use the Kubernetes command-line tool, kubectl.
- The API Connect operator and DataPower operator pods are needed to uninstall subsystems
individually.
- If need to retain data to re-use during a re-installation later, follow the backup and restore
procedures Backing up, restoring, and disaster recovery.
- If you want to delete all of API Connect, do not use this topic. Instead, see Removing API Connect.
Procedure
- Uninstall the Management subsystem
- Save the management subsystem name:
kubectl get mgmt -n <namespace> -o yaml
This command returns the YAML format of the management custom resource. Make a note of the
name.
- Delete the Management Subsystem.
kubectl delete mgmt --all -n <namespace>
Important:
If your deployment uses default namespaces be cautious when using kubectl delete
<entity> --all
commands. There can be other pods, services, and more
in the default namespace. When using the default namespace, keep in mind that using
kubernetes delete <entity> --all
, where
<entity
> can delete non-APIC entities, such as
sa
(Service Accounts), secrets
, rolebindings
,
etc.
The Management CR deletion will take some time because the apiconnect operator must delete the
Postgres cluster.
- Manually delete secrets and PVCs:
- Get all of the secrets that use the management subsystem name (which you determined in Step
1.a):
kubectl get secrets -n <namespace> | grep <management-subsystem-name>
- For each secret that uses the management subsystem name, run the following command to delete the
secret:
kubectl delete secrets <secret_name> -n <namespace>
- Get all the PVCs that use the management subsystem
name:
kubectl get pvc -n <namespace> | grep <management-subsystem-name>
- For each PVC that uses the management subsystem name, run the following command to delete the
PVC:
kubectl delete pvc <pvc_name> -n <namespace>
- If management subsystem backup and restore CRs are left stale, delete them also:
- Get the names of the backup
CRs:
kubectl get Backup -n <namespace>
- Delete the backup
CRs:
kubectl delete Backup <backup_cr_name> -n <namespace>
- Get the names of the restore
CRs:
kubectl get ManagementRestore -n <namespace>
- Delete the restore
CRs:
kubectl delete ManagementRestore <restore_cr_name> -n <namespace>
Note: If you have management backup CRs from V10.0.6.0 or earlier, delete those too:
- Get the name of the backup
CR:
kubectl get mgmtb -n <namespace>
- Delete the backup
CR:
kubectl delete mgmtb <backup_cr_name> -n <namespace>
- Get the name of the restore
CR:
kubectl get mgmtr -n <namespace>
- Delete the restore
CR:
kubectl delete mgmtr <restore_cr_name> -n <namespace>
-
Uninstall Analytics subsystem
- Delete the Analytics subsystem, the Analytics backup, and the Analytics restore
CRs.
kubectl delete a7s --all -n <namespace>
kubectl delete a7b --all -n <namespace>
kubectl delete a7r --all -n <namespace>
- Manually delete the Analytics secrets:
kubectl delete secrets <secret_name> -n <namespace>
for each of the following secrets:
analytics-ai-endpoint
analytics-ca
analytics-client
analytics-server
- Manually delete analytics Persistent Volume Claims (PVCs):
kubectl delete pvc <pvc_name> -n <namespace>
for PVCs with the following naming pattern:
data-analytics-storage
-
Uninstall the Developer Portal subsystem
- Delete the Developer Portal subsystem, and the Portal backup and restore CRs.
kubectl delete ptl --all -n <namespace>
kubectl delete pb --all -n <namespace>
kubectl delete pr --all -n <namespace>
- Manually delete Developer Portal secrets:
kubectl delete secrets <secret_name> -n <namespace>
for secrets with the following naming pattern:
portal-admin
portal-admin-client
portal-ca
portal-client
portal-db-ca
portal-encryption-key-...
portal-server
portal-web
- Manually delete these Developer Portal PVCs:
kubectl delete pvc <pvc_name> -n <namespace>
for PVCs with the following naming pattern:
admin-portal-...-www-...
backup-portal-...-www-...
db-portal-...-db-...
dblogs-portal-...-db-...
web-portal-...-www-...
- Delete the DataPower Gateway subsystem.
kubectl delete gw --all -n <namespace>
Note: The following entries include both Multi-Protocol Gateway Service (v5-compatible) and API
Gateway settings. Names that include "gwv5" refer to the
Multi-Protocol Gateway Service (v5-compatible), and names that include "gwv6" refer to the API Gateway.
- Delete Service Accounts.
kubectl delete sa <service_account> -n <namespace>
for each of the following Service Accounts:
gwv5-datapower
gwv6-datapower
- Delete Secrets.
kubectl delete secrets <secret_name> -n <namespace>
for secrets with the following naming pattern:
gwv5-datapower-token-...
gwv5-dpm-sa-token-...
gwv5-endpoint
gwv5-manager-endpoint
gwv6-datapower-token-...
gwv6-dpm-sa-token-...
gwv6-endpoint.
gwv6-manager-endpoint
- Delete PVCs.
kubectl delete pvc <pvc_name> -n <namespace>
for PVCs with the following naming pattern:
gwv5...
gwv6...