You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "cluster-autoscaler" Deployment's pod spec includes the three environment variables required to use IRSA for its "cluster-autoscaler" ServiceAccount. For each of the cluster autoscaler's pods, the container starts, then dies immediately for lack of AWS IAM permission:
aws_cloud_provider.go:369] Failed to generate AWS EC2 Instance Types: UnauthorizedOperation: You are not authorized to perform this operation.
The related IAM role's policy lacks the "ec2:DescribeInstanceTypes" action. Per #12187, by default, we have the cluster autoscaler generate its set of EC2 instance types dynamically, and in that mode the cluster autoscaler documentation mentions granting the “ec2:DescribeInstanceTypes” permission when using the dynamic EC2 catalog survey.
6. What did you expect to happen?
kOps would recognize the intersection of using "external service account permissions" and the cluster autoscaler's dynamic EC2 catalog survey being enabled, and add the missing "ec2:DescribeInstanceTypes" action to the cluster autoscaler' dedicated IAM role's policy.
7. Please provide your cluster manifest. Execute kops get --name my.example.com -o yaml to display your cluster manifest.
You may want to remove your cluster name and other sensitive information.
1. What
kops
version are you running?1.23.0 (git-a067cd7742a497a5c512762b9880664d865289f1)
2. What Kubernetes version are you running?
1.23.5
3. What cloud provider are you using?
AWS
4. What commands did you run? What is the simplest way to reproduce this issue?
Set the following fields in a Cluster manifest:
Given that, run the following:
5. What happened after the commands executed?
The "cluster-autoscaler" Deployment's pod spec includes the three environment variables required to use IRSA for its "cluster-autoscaler" ServiceAccount. For each of the cluster autoscaler's pods, the container starts, then dies immediately for lack of AWS IAM permission:
The related IAM role's policy lacks the "ec2:DescribeInstanceTypes" action. Per #12187, by default, we have the cluster autoscaler generate its set of EC2 instance types dynamically, and in that mode the cluster autoscaler documentation mentions granting the “ec2:DescribeInstanceTypes” permission when using the dynamic EC2 catalog survey.
6. What did you expect to happen?
kOps would recognize the intersection of using "external service account permissions" and the cluster autoscaler's dynamic EC2 catalog survey being enabled, and add the missing "ec2:DescribeInstanceTypes" action to the cluster autoscaler' dedicated IAM role's policy.
7. Please provide your cluster manifest. Execute
kops get --name my.example.com -o yaml
to display your cluster manifest.You may want to remove your cluster name and other sensitive information.
cluster.yaml file
9. Anything else do we need to know?
I first brought up this problem in the "kops-users" channel of the "Kubernetes" Slack workspace.
I see that it's possible to disable the cluster autoscaler's dynamic EC2 instance type survey by setting the "spec.clusterAutoscaler.awsUseStaticInstanceList" field to true.
/kind bug
The text was updated successfully, but these errors were encountered: