Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete IAM Service Account before deleting CloudFormation Stack in Getting Starting guide #624

Merged
merged 1 commit into from
Aug 18, 2021

Conversation

cjerad
Copy link
Contributor

@cjerad cjerad commented Aug 18, 2021

Issue, if available:

Description of problem:

See https://karpenter.sh/docs/getting-started/#cleanup

The command aws cloudformation delete-stack [...] succeeds on the command line but in the AWS Console the CloudFormation Stack's status changes to DELETE_FAILED with the reason The following resource(s) failed to delete: [KarpenterControllerPolicy]. The policy is used by the IAM Service Account created manually during the setup.

Description of change:

Before attempting to delete the CloudFormation Stack:

  1. Uninstall the karpenter helm chart -- since it utilizes the IAM Service Account
  2. Delete the IAM Service Account

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@netlify
Copy link

netlify bot commented Aug 18, 2021

✔️ Deploy Preview for karpenter-docs-prod ready!

🔨 Explore the source changes: 6e6eb8d

🔍 Inspect the deploy log: https://app.netlify.com/sites/karpenter-docs-prod/deploys/611d49c1bdc21f00071017cb

😎 Browse the preview: https://deploy-preview-624--karpenter-docs-prod.netlify.app

@@ -229,6 +229,8 @@ kubectl delete node $NODE_NAME
To avoid additional charges, remove the demo infrastructure from your AWS account.

```bash
helm uninstall karpenter --namespace karpenter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to uninstall karpenter if we're deleting the cluster?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not 100% certain that it is necessary, but the helm chart uses the IAM Service Account and I wanted to avoid the dependency blocking the deletion of the IAM Service Account.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Certainly doesn't hurt, just adds a few seconds.

@@ -229,6 +229,8 @@ kubectl delete node $NODE_NAME
To avoid additional charges, remove the demo infrastructure from your AWS account.

```bash
helm uninstall karpenter --namespace karpenter
eksctl delete iamserviceaccount --cluster ${CLUSTER_NAME} --name karpenter --namespace karpenter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@cjerad cjerad marked this pull request as ready for review August 18, 2021 18:47
@ellistarn ellistarn merged commit d2e87ba into aws:main Aug 18, 2021
@cjerad cjerad deleted the fix-getting-started-cleanup branch August 18, 2021 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants