aws-cdk-lib.aws_eks.KubectlProviderAttributes

interface KubectlProviderAttributes

LanguageType name
.NETAmazon.CDK.AWS.EKS.KubectlProviderAttributes
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awseks#KubectlProviderAttributes
Javasoftware.amazon.awscdk.services.eks.KubectlProviderAttributes
Pythonaws_cdk.aws_eks.KubectlProviderAttributes
TypeScript (source)aws-cdk-lib » aws_eks » KubectlProviderAttributes

Kubectl Provider Attributes.

Example

const handlerRole = iam.Role.fromRoleArn(this, 'HandlerRole', 'arn:aws:iam::123456789012:role/lambda-role');
// get the serivceToken from the custom resource provider
const functionArn = lambda.Function.fromFunctionName(this, 'ProviderOnEventFunc', 'ProviderframeworkonEvent-XXX').functionArn;
const kubectlProvider = eks.KubectlProvider.fromKubectlProviderAttributes(this, 'KubectlProvider', {
  functionArn,
  kubectlRoleArn: 'arn:aws:iam::123456789012:role/kubectl-role',
  handlerRole,
});

const cluster = eks.Cluster.fromClusterAttributes(this, 'Cluster', {
  clusterName: 'cluster',
  kubectlProvider,
});

Properties

NameTypeDescription
functionArnstringThe custom resource provider's service token.
handlerRoleIRoleThe IAM execution role of the handler.
kubectlRoleArnstringThe IAM role to assume in order to perform kubectl operations against this cluster.

functionArn

Type: string

The custom resource provider's service token.


handlerRole

Type: IRole

The IAM execution role of the handler.

This role must be able to assume kubectlRoleArn


kubectlRoleArn

Type: string

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