Skip to content

Commit

Permalink
Merge pull request #212 from ruecarlo/karpenter-upgrade-0.16.1
Browse files Browse the repository at this point in the history
Karpenter upgrade 0.16.1
  • Loading branch information
ruecarlo authored Sep 8, 2022
2 parents c237751 + 512f5f8 commit 97febb7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion content/karpenter/040_k8s_tools/install_kube_ops_view.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
23 changes: 14 additions & 9 deletions content/karpenter/200_cleanup/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}}

0 comments on commit 97febb7

Please sign in to comment.