dcloud eks pod-identity-associations create

Let pods of a service account act as an IAM role

IAM eks:CreatePodIdentityAssociationChanges state

Also needs iam:PassRole on the role. Pods created afterwards get AWS_ROLE_ARN, AWS_WEB_IDENTITY_TOKEN_FILE and AWS_ENDPOINT_URL_STS/S3, so AWS SDKs work unchanged. 409 when the service account already has one.

Synopsis

dcloud eks pod-identity-associations create cluster --namespace namespace --service-account serviceAccount --role role

Arguments

  • <cluster>Required

    string

    Also accepted as --cluster. Constraints: /^(ewk-[0-9a-f]{12}|[a-z]([a-z0-9-]{0,38}[a-z0-9])?)$/

Flags

  • --namespaceRequired

    string

    Namespace of the service account

    Constraints: /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/

  • --service-accountRequired

    string

    Service account whose pods get the role

    Constraints: max 253 chars, /^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/

  • --roleRequired

    string

    Name of the IAM role the pods act as; needs iam:PassRole on it

    Constraints: 1-128 chars

Example

dcloud eks pod-identity-associations create cluster --namespace example --service-account example --role example

Generated from the API description, the same one the API checks requests against and the CLI is built from.