Created
April 28, 2020 21:39
-
-
Save hsm207/050736fd9a038f849f88ca934e47ad8a to your computer and use it in GitHub Desktop.
Cleanup after playing with EKS and kubeflow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# delete the jupyter deployment | |
kubectl delete -f /tmp/deploy.yaml | |
# delete the FSx filesystems | |
kubectl delete -f /tmp/claim.yaml | |
kubectl delete -f /tmp/claim-kf.yaml | |
kubectl delete -f /tmp/storage-class.yaml | |
kubectl delete -k github.com/kubernetes-sigs/aws-fsx-csi-driver/deploy/kubernetes/overlays/stable/?ref=master | |
aws ec2 delete-security-group --group-id ${SECURITY_GROUP_ID} | |
aws iam detach-role-policy --role-name ${INSTANCE_ROLE_NAME} --policy-arn ${POLICY_ARN} | |
aws iam delete-policy --policy-arn $POLICY_ARN | |
# delete kubeflow | |
cd ${KF_DIR} | |
kfctl delete -f ${CONFIG_FILE} --delete_storage | |
# delete the cluster | |
# remember to delete all services with an external ip | |
# refer to: https://docs.aws.amazon.com/eks/latest/userguide/delete-cluster.html | |
cd ~/eks_getting_started | |
eksctl delete cluster -f ./configs/clusters/minimal.yaml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment