[aws-eks] Support adding service accounts to imported clusters
See original GitHub issueit seems like ICluster interface doesn’t have addServiceAccount function. So it’s not possible to add service account to the existing cluster
Reproduction Steps
const cluster = Cluster.fromClusterAttributes(this, clusterName, {
clusterName: clusterName,
kubectlRoleArn: 'arn:aws:iam::1111111:role/iam-role-that-has-masters-access'
});
const serviceAccount = cluster.addServiceAccount(id);
serviceAccount.addToPolicy(new PolicyStatement({
resources: ["arn:aws:s3:::testBucket"],
actions: [
"HeadBucket",
"ListAllMyBuckets",
"ListBuckets"
]
}))
What did you expect to happen?
no error
What actually happened?
cluster.addServiceAccount is not a function
Environment
- CLI Version :1.64.1
- Framework Version:1.63.0
- Node.js Version:10.7.0
- OS :macos
- Language (Version):3.9.6
Other
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (11 by maintainers)
Top Results From Across the Web
Kubernetes service accounts - Amazon EKS
A Kubernetes service account provides an identity for processes that run in a pod . For more information see Managing Service Accounts in...
Read more >aws-cdk/aws-eks module - AWS Documentation
This construct library allows you to define Amazon Elastic Container Service for Kubernetes (EKS) clusters. In addition, the library also supports defining ...
Read more >Configuring a Kubernetes service account to assume an IAM ...
This topic covers how to configure a Kubernetes service account to assume an AWS Identity and Access Management (IAM) role. Any pods that...
Read more >Migrating Amazon EKS clusters from gp2 to gp3 EBS volumes
Attach the IAM permissions required for Amazon EBS operations to either the worker node profile or alternatively, following least privilege, use ...
Read more >Package software.amazon.awscdk.services.eks
You can create, update, or terminate nodes for your cluster with a single operation. Nodes run using the latest Amazon EKS optimized AMIs...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Adding Service Accounts to imported clusters is indeed currently unsupported. Marking this as a feature request.
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.