Namespace deletion may take few minutes, please wait till the process completes.
kubectl delete namespace prodcatalog-ns
aws ecr delete-repository --repository-name eks-app-mesh-demo/catalog_detail --force
aws ecr delete-repository --repository-name eks-app-mesh-demo/frontend_node --force
aws ecr delete-repository --repository-name eks-app-mesh-demo/product_catalog --force
eksctl utils update-cluster-logging --disable-types all \
--region ${AWS_REGION} \
--cluster eksworkshop-eksctl \
--approve
kubectl delete namespace amazon-cloudwatch
kubectl delete namespace aws-observability
kubectl delete meshes prodcatalog-mesh
helm -n appmesh-system delete appmesh-controller
for i in $(kubectl get crd | grep appmesh | cut -d" " -f1) ; do
kubectl delete crd $i
done
eksctl delete iamserviceaccount --cluster eksworkshop-eksctl --namespace appmesh-system --name appmesh-controller
kubectl delete namespace appmesh-system
export PodRole=$(aws eks describe-fargate-profile --cluster-name eksworkshop-eksctl --fargate-profile-name fargate-productcatalog --query 'fargateProfile.podExecutionRoleArn' | sed -n 's/^.*role\/\(.*\)".*$/\1/ p')
aws iam detach-role-policy \
--policy-arn arn:aws:iam::${ACCOUNT_ID}:policy/FluentBitEKSFargate \
--role-name ${PodRole}
aws iam delete-policy --policy-arn arn:aws:iam::$ACCOUNT_ID:policy/FluentBitEKSFargate
eksctl delete fargateprofile \
--name fargate-productcatalog \
--cluster eksworkshop-eksctl
eksctl delete iamserviceaccount --cluster eksworkshop-eksctl --namespace prodcatalog-ns --name prodcatalog-envoy-proxies
aws iam delete-policy --policy-arn arn:aws:iam::$ACCOUNT_ID:policy/ProdEnvoyNamespaceIAMPolicy