interface KubectlProviderAttributes
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EKS.KubectlProviderAttributes |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awseks#KubectlProviderAttributes |
Java | software.amazon.awscdk.services.eks.KubectlProviderAttributes |
Python | aws_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
Name | Type | Description |
---|---|---|
function | string | The custom resource provider's service token. |
handler | IRole | The IAM execution role of the handler. |
kubectl | string | The 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.