Implementation of Kubectl Lambda.
import { KubectlProvider } from 'aws-cdk-lib/aws-eks-v2';Or use the module namespace:
import * as eks_v2 from 'aws-cdk-lib/aws-eks-v2';
// eks_v2.KubectlProviderConfiguration passed to the constructor as KubectlProviderProps.
clusterRequiredIClusterThe cluster to control.
KubectlProviderOptionskubectlLayerRequiredinherited from KubectlProviderOptionsILayerVersionAn AWS Lambda layer that includes `kubectl` and `helm`.
awscliLayerOptionalinherited from KubectlProviderOptionsILayerVersionAn AWS Lambda layer that contains the `aws` CLI.
Default: - If not defined, a default layer will be used containing the AWS CLI 2.x.
environmentOptionalinherited from KubectlProviderOptions{ [key: string]: string }Custom environment variables when running `kubectl` against this cluster.
Default: - No custom environment variables
memoryOptionalinherited from KubectlProviderOptionsSizeThe amount of memory allocated to the kubectl provider's lambda function.
Default: - 1024
privateSubnetsOptionalinherited from KubectlProviderOptionsISubnet[]Subnets to host the `kubectl` compute resources. If not specified, the k8s endpoint is expected to be accessible publicly.
Default: - the k8s is accessible publicly
removalPolicyOptionalinherited from KubectlProviderOptionsRemovalPolicyThe removal policy applied to the custom resource that provides kubectl. The removal policy controls what happens to the resource if it stops being managed by CloudFormation. This can happen in one of three situations: - The resource is removed from the template, so CloudFormation stops managing it - A change to the resource is made that requires it to be replaced, so CloudFormation stops managing it - The stack is deleted, so CloudFormation stops managing all resources in it
Default: RemovalPolicy.DESTROY
roleOptionalinherited from KubectlProviderOptionsIRoleAn IAM role that can perform kubectl operations against this cluster. The role should be mapped to the `system:masters` Kubernetes RBAC role. This role is directly passed to the lambda handler that sends Kube Ctl commands to the cluster.
Default: - if not specified, the default role created by a lambda function will
be used.
securityGroupOptionalDeprecatedinherited from KubectlProviderOptionsISecurityGroupA security group to use for `kubectl` execution.
Default: - If not specified, the k8s endpoint is expected to be accessible
publicly.
Deprecated: Use `securityGroups` instead.
securityGroupsOptionalinherited from KubectlProviderOptionsISecurityGroup[]Security groups to use for `kubectl` execution.
Default: - If not specified, the k8s endpoint is expected to be accessible
publicly.
Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.
Subscribe to Newsletteraws-eks-v2