aws-samples / cdk-eks-karpenter

CDK construct for installing and configuring Karpenter on EKS clusters
Apache License 2.0
34 stars 14 forks source link

Missing role permission #114

Closed aarongundel closed 1 year ago

aarongundel commented 1 year ago

When attempting to get a Karpenter working, I ran into an issue where I was trying to use a custom AMI and the node wouldn't provision. The issue was that ec2:DescribeImages wasn't granted.

2023-06-22T17:01:56.225Z ERROR controller Reconciler error {"commit": "26e2d35-dirty", "controller": "awsnodetemplate", "controllerGroup": "karpenter.k8s.aws", "controllerKind": "AWSNodeTemplate", "AWSNodeTemplate": {"name":"nodetemplate"}, "namespace": "", "name": "nodetemplate", "reconcileID": "4f43a1f5-7b56-427c-babd-977afd762c10", "error": "describing images [{\n Name: \"image-id\",\n Values: [\n ",\n \"\"\n ]\n}], UnauthorizedOperation: You are not authorized to perform this operation.\n\tstatus code: 403, request id: dd920ad9-4540-4a50-bef8-f3b3554349e4"}

Once I added DescribeImages to the Karpenter role, I was able to provision nodes. Is this an oversight on my part, or something that can be PR'd into the project?

andskli commented 1 year ago

Hi @aarongundel

I believe this should have been added by #109. Which version are you using of the construct?

aarongundel commented 1 year ago

@andskli my bad - I thought I was current. Ran the update on the construct and it's good to go. Love this project, it is a real timesaver!