-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
chore(eks): improve documentation for updating a cluster #30259
Conversation
Signed-off-by: Francis <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm 🚀
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
### Reason for this change In our EKS documentation, we note that you need to add a temporary policy to the cluster admin role for successful replacement when renaming a cluster. The temporary policy we recommend adding to the cluster admin role is: ```ts cluster.adminRole.addToPolicy(new iam.PolicyStatement({ actions: [ 'eks:DeleteCluster', ], resources: [ Stack.of(this).formatArn({ service: 'eks', resource: 'cluster', resourceName: 'foo' }), ] })) ``` Changing the cluster name is an update that requires replacement. This will cause the old cluster to be automatically deleted by CloudFormation upon success. Since this policy doesn't have the `eks:DescribeCluster` action, the delete will fail: <img width="893" alt="image" src="https://github.com/aws/aws-cdk/assets/131073567/bb3cf3ff-3a6d-48f9-b84d-c6d0b8a495a7"> ### Description of changes Added `eks:DescribeCluster` to the actions of the recommended temporary policy. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one. |
Reason for this change
In our EKS documentation, we note that you need to add a temporary policy to the cluster admin role for
successful replacement when renaming a cluster. The temporary policy we recommend adding to the cluster admin role is:
Changing the cluster name is an update that requires replacement. This will cause the old cluster to be automatically deleted by CloudFormation upon success. Since this policy doesn't have the
eks:DescribeCluster
action, the delete will fail:Description of changes
Added
eks:DescribeCluster
to the actions of the recommended temporary policy.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license