AwsAuthMapping

class aws_cdk.aws_eks.AwsAuthMapping(*, groups, username=None)

Bases: object

AwsAuth mapping.

Parameters:
  • groups (Sequence[str]) – A list of groups within Kubernetes to which the role is mapped.

  • username (Optional[str]) – The user name within Kubernetes to map to the IAM role. Default: - By default, the user name is the ARN of the IAM role.

ExampleMetadata:

infused

Example:

# cluster: eks.Cluster

admin_user = iam.User(self, "Admin")
cluster.aws_auth.add_user_mapping(admin_user, groups=["system:masters"])

Attributes

groups

A list of groups within Kubernetes to which the role is mapped.

See:

https://kubernetes.io/docs/reference/access-authn-authz/rbac/#default-roles-and-role-bindings

username

The user name within Kubernetes to map to the IAM role.

Default:
  • By default, the user name is the ARN of the IAM role.