Cleanup

Delete Flagger Resources

kubectl delete canary detail -n  flagger
helm uninstall flagger-loadtester -n flagger
kubectl delete HorizontalPodAutoscaler detail -n flagger
kubectl delete deployment detail -n  flagger

Delete Flagger Namespace

Namespace deletion may take few minutes, please wait till the process completes.

kubectl delete namespace flagger

Delete the Mesh

kubectl delete meshes flagger

Delete Policies and Service Accounts for flagger namespace

aws iam delete-policy --policy-arn arn:aws:iam::$ACCOUNT_ID:policy/FlaggerEnvoyNamespaceIAMPolicy
eksctl delete iamserviceaccount  --cluster eksworkshop-eksctl --namespace flagger --name flagger-envoy-proxies

Uninstall the Flagger Helm Charts

helm -n appmesh-system delete flagger

Delete Flagger CRDs

for i in $(kubectl get crd | grep flagger | cut -d" " -f1) ; do
kubectl delete crd $i
done

Uninstall Prometheus Helm Charts

helm -n appmesh-system delete appmesh-prometheus

Uninstall Metric Server

kubectl delete -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.4.1/components.yaml

Uninstall AppMesh


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