-
Notifications
You must be signed in to change notification settings - Fork 4k
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
docs: precise AWS IAM policy example #6448
docs: precise AWS IAM policy example #6448
Conversation
|
Welcome @blanchardma! |
Hi @blanchardma |
To check EasyCLA /easycla |
Hey @blanchardma, thanks for the PR! Just to confirm my understanding, the issue is when you use a common set of tag based restriction as you've linked to, there's a few of the actions you end up unable to perform when deploying with the terraform-aws-eks module? Can you share an (appropriately obfuscated) config example for me to understand a bit more? |
Yes, if you follow the instructions from the docs (full-cluster-autoscaler-features-policy-recommended) and add as recommended conditions it will end up in an IAM policy like this:
If you use this IAM policy above, for example together with eksctl or the already mentioned terraform-aws-eks module, then it will end in an access denied for the Cluster Autoscaler on EKS API. This is because EKS does not meet the condition because the tags are missing. The IAM policy should look like as proposed in the PR:
It separates the policy into read actions (Describe/Get) and write actions (Set/Terminate) and binds the more critical ones to the condition. |
I am ran into the access denied issue for eks:DescribeNodeGroup permission due to the documentation being incorrect about the IAM policy. It works after the policy as proposed by @blanchardma |
/lgtm |
/approved |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: blanchardma, drmorr0 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
1 similar comment
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: blanchardma, drmorr0 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind documentation
What this PR does / why we need it:
On the same page where I made my changes for this PR is the following instruction written:
"In this example, only the second block of actions should be updated to restrict the resources/add conditionals:"
If you then add a common condition like its often mentioned here in the issues or also recommended in the EKS Best Practices Guides which looks like:
It's important to note that applying such conditions togehter with the example IAM policy often lead to an issue where the Cluster Autoscaler does not have the necessary access on the EKS API. If for example all is deployed with terraform-aws-eks, the EKS does not have out of the box these tags but the Auto Scaling Group already have it. This causes the following exception of the Cluster Autoscaler:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: