-
Un-deploy the applications/microservices on the workload clusters by removing the resources listed in
gitops-workloads/\<cluster-name\>/kustomization.yaml
-
Un-deploy the workload clusters by removing the resources listed in
gitops-system/clusters-config/kustomization.yaml
-
Un-deploy the management cluster.
eksctl delete cluster --name mgmt --region $AWS_REGION
-
Remove the GitHub repos or AWS CodeCommit repos you created.
- For GitHub you can use:
gh repo delete --confirm product-catalog-api-manifests gh repo delete --confirm product-catalog-fe-manifests gh repo delete --confirm gitops-workloads gh repo delete --confirm gitops-system
- For GitHub you can use:
-
Remove the secret in Secrets Manager.
aws secretsmanager delete-secret --secret-id sealed-secrets --force-delete-without-recovery
-
Remove the crossplane role
POLICY_ARN=$(aws iam list-attached-role-policies --role-name crossplane-role --query AttachedPolicies[0].PolicyArn --output text) aws iam detach-role-policy --role-name crossplane-role --policy-arn $POLICY_ARN aws iam delete-policy --policy-arn $POLICY_ARN aws iam delete-role --role-name crossplane-role
-
Remove DynamoDB tables created by the
product-catalog-api
application. You can list tables starting with "product-" using:aws dynamodb list-tables --query "TableNames[?starts_with(@, 'prod') == \`true\`]"
Then delete individual tables using:
aws dynamodb delete-table --table-name <table-name>