KubectlProviderAttributes

class aws_cdk.aws_eks.KubectlProviderAttributes(*, function_arn, handler_role, kubectl_role_arn)

Bases: object

Kubectl Provider Attributes.

Parameters
  • function_arn (str) – The kubectl provider lambda arn.

  • handler_role (IRole) – The IAM execution role of the handler. This role must be able to assume kubectlRoleArn

  • kubectl_role_arn (str) – The IAM role to assume in order to perform kubectl operations against this cluster.

ExampleMetadata

infused

Example:

handler_role = iam.Role.from_role_arn(self, "HandlerRole", "arn:aws:iam::123456789012:role/lambda-role")
kubectl_provider = eks.KubectlProvider.from_kubectl_provider_attributes(self, "KubectlProvider",
    function_arn="arn:aws:lambda:us-east-2:123456789012:function:my-function:1",
    kubectl_role_arn="arn:aws:iam::123456789012:role/kubectl-role",
    handler_role=handler_role
)

cluster = eks.Cluster.from_cluster_attributes(self, "Cluster",
    cluster_name="cluster",
    kubectl_provider=kubectl_provider
)

Attributes

function_arn

The kubectl provider lambda arn.

Return type

str

handler_role

The IAM execution role of the handler.

This role must be able to assume kubectlRoleArn

Return type

IRole

kubectl_role_arn

The IAM role to assume in order to perform kubectl operations against this cluster.

Return type

str