diff --git a/content/karpenter/040_k8s_tools/install_kube_ops_view.md b/content/karpenter/040_k8s_tools/install_kube_ops_view.md index 1427479b..d61fd849 100644 --- a/content/karpenter/040_k8s_tools/install_kube_ops_view.md +++ b/content/karpenter/040_k8s_tools/install_kube_ops_view.md @@ -11,7 +11,7 @@ The following lines download the spec required to deploy kube-ops-view using a L ``` mkdir $HOME/environment/kube-ops-view -for file in kustomization.yaml rbac.yaml deployment.yaml service.yaml; do curl "https://raw.githubusercontent.com/awslabs/ec2-spot-workshops/master/content/karpenter/030_k8s_tools/k8_tools.files/kube_ops_view/${file}" > $HOME/environment/kube-ops-view/${file}; done +for file in kustomization.yaml rbac.yaml deployment.yaml service.yaml; do curl "https://raw.githubusercontent.com/awslabs/ec2-spot-workshops/master/content/karpenter/040_k8s_tools/k8_tools.files/kube_ops_view/${file}" > $HOME/environment/kube-ops-view/${file}; done kubectl apply -k $HOME/environment/kube-ops-view ``` diff --git a/content/karpenter/200_cleanup/_index.md b/content/karpenter/200_cleanup/_index.md index d610f7e5..31ce5e57 100644 --- a/content/karpenter/200_cleanup/_index.md +++ b/content/karpenter/200_cleanup/_index.md @@ -33,18 +33,23 @@ kubectl delete -f https://github.com/kubernetes-sigs/metrics-server/releases/dow ## Removing the cluster, Managed node groups and Karpenter pre-requisites ``` + +aws cloudformation delete-stack --stack-name eksctl-eksworkshop-eksctl-addon-iamserviceaccount-karpenter-karpenter +aws cloudformation wait stack-delete-complete --stack-name eksctl-eksworkshop-eksctl-addon-iamserviceaccount-karpenter-karpenter + aws cloudformation delete-stack --stack-name Karpenter-eksworkshop-eksctl -eksctl delete cluster -f eksworkshop.yaml -``` +aws cloudformation wait stack-delete-complete --stack-name Karpenter-eksworkshop-eksctl -## Delete SSH Key Pair and Cloud 9 -``` -aws ec2 delete-key-pair --key-name eksworkshop -CLOUD_9_IDS=$(aws cloud9 list-environments | jq -c ".environmentIds | flatten(0)" | sed -E -e 's/\[|\]|\"|//g' | sed 's/,/ /g') -CLOUD_9_WORKSHOP_ID=$(aws cloud9 describe-environments --environment-ids $CLOUD_9_IDS | jq '.environments | .[] | select(.name=="eksworkshop") | .id ' | sed -e 's/\"//g') -aws cloud9 delete-environment --environment-id $CLOUD_9_WORKSHOP_ID +aws cloudformation delete-stack --stack-name eksctl-eksworkshop-eksctl-nodegroup-mng-od-m5large +aws cloudformation wait stack-delete-complete --stack-name eksctl-eksworkshop-eksctl-nodegroup-mng-od-m5large + +aws cloudformation delete-stack --stack-name eksctl-eksworkshop-eksctl-cluster +aws cloudformation wait stack-delete-complete --stack-name eksctl-eksworkshop-eksctl-cluster + +aws cloudformation delete-stack --stack-name karpenter-workshop +aws cloudformation wait stack-delete-complete --stack-name karpenter-workshop ``` {{% notice tip %}} -If you get any error while running this command, perhaps it might be caused because the name you selected for your cloud9 environment is different from **eksworkshop**. You can either find out and replace the name in the commands with the right name or [Use the console to delete the environment](https://docs.aws.amazon.com/cloud9/latest/user-guide/delete-environment.html). +If you get any error while running this command, perhaps it might be caused because the name you selected for your cloud9 environment is different from **karpenter-workshop**. You can either find out and replace the name in the commands with the right name or [Use the console to delete the environment](https://docs.aws.amazon.com/cloud9/latest/user-guide/delete-environment.html). {{% /notice %}}