KubectlProviderAttributes
- class aws_cdk.aws_eks.KubectlProviderAttributes(*, function_arn, handler_role, kubectl_role_arn)
Bases:
object
Kubectl Provider Attributes.
- Parameters:
function_arn (
str
) – The custom resource provider’s service token.handler_role (
IRole
) – The IAM execution role of the handler. This role must be able to assume kubectlRoleArnkubectl_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") # get the serviceToken from the custom resource provider function_arn = lambda_.Function.from_function_name(self, "ProviderOnEventFunc", "ProviderframeworkonEvent-XXX").function_arn kubectl_provider = eks.KubectlProvider.from_kubectl_provider_attributes(self, "KubectlProvider", function_arn=function_arn, 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 custom resource provider’s service token.
- handler_role
The IAM execution role of the handler.
This role must be able to assume kubectlRoleArn
- kubectl_role_arn
The IAM role to assume in order to perform kubectl operations against this cluster.