-
Hi, I'm migrating one of my cluster deployments from CloudFormation to eksctl. One of the things I have setup in CloudFormation is IAM Roles for Service Accounts In my cluster, however, we deploy a separate namespace for each team member and they have a full-stack for development. Thus, it might look like:
Let's say the
However, looking at the eksctl example for IAM service roles you can either attach a policy or define one inline for a particular namespace. I don't see a proper way to do this other than to pre-create the policy with another tool (e.g. aws cli, terraform, etc.) and then create several entries in the eksctl yaml like this:
What would be ideal is if I could create the standalone IAM role in the eksctl YAML, and then reference it per each namespace like I can do in CloudFormation. I know eksctl generates CloudFormation templates. Is there a better way to accomplish what I am trying to do? The other thing I'm trying to understand is how to update it if a new team member joins and I want to dynamically add their namespace. In CloudFormation this was an easy update operatorion. It's my understanding that you cannot modify a Thus, if I gain a new team member and want to update the service account for them, it isn't easily done....? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I was able to resolve this. I did not realize you could create additional iam service accounts on the CLI, and also sync to the eksctl yaml file. The only thing I had to adjust was not creating the same service account name myself in the flux resources since it gets auto-generated. I also found out if it gets deleted in the cluster, you have to delete it with eksctl (which deletes the cloud formation template), then you can re-create it. |
Beta Was this translation helpful? Give feedback.
I was able to resolve this. I did not realize you could create additional iam service accounts on the CLI, and also sync to the eksctl yaml file. The only thing I had to adjust was not creating the same service account name myself in the flux resources since it gets auto-generated.
I also found out if it gets deleted in the cluster, you have to delete it with eksctl (which deletes the cloud formation template), then you can re-create it.