KubectlProviderOptions Struct
Options for creating the kubectl provider - a lambda function that executes kubectl and helm against the cluster.
Example
import { KubectlV36Layer } from '@aws-cdk/lambda-layer-kubectl-v36';
const cluster = new eks.Cluster(this, 'hello-eks', {
version: eks.KubernetesVersion.V1_36,
kubectlProviderOptions: {
kubectlLayer: new KubectlV36Layer(this, 'kubectl'),
environment: {
'http_proxy': 'http://proxy.myproxy.com',
},
}
});
Properties
awscliLayerILayerVersionawscli_layerILayerVersionawscliLayerILayerVersionAwscliLayerILayerVersionAwscliLayerILayerVersion= If not defined, a default layer …#default
Default: If not defined, a default layer will be used containing the AWS CLI 2.x.
environment{ [key: string]: string }environmenttyping.Mapping[str, str]environmentMap<String, String>EnvironmentIDictionary<string, string>Environment*map[string]*string= No custom environment variables#kubectlLayerILayerVersionkubectl_layerILayerVersionkubectlLayerILayerVersionKubectlLayerILayerVersionKubectlLayerILayerVersionrequired#privateSubnetsISubnet[]private_subnetstyping.List[ISubnet]privateSubnetsList<ISubnet>PrivateSubnetsISubnet[]PrivateSubnets*[]ISubnet= the k8s is accessible publicly#If not specified, the k8s endpoint is expected to be accessible publicly.
removalPolicyRemovalPolicyremoval_policyRemovalPolicyremovalPolicyRemovalPolicyRemovalPolicyRemovalPolicyRemovalPolicyRemovalPolicy= RemovalPolicy.DESTROY#notes
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
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
Default: if not specified, the default role created by a lambda function will be used.
securityGroupISecurityGroupsecurity_groupISecurityGroupsecurityGroupISecurityGroupSecurityGroupISecurityGroupSecurityGroupISecurityGroup= If not specified, the k8s endpoi…deprecated#default
Default: If not specified, the k8s endpoint is expected to be accessible publicly.
securityGroupsISecurityGroup[]security_groupstyping.List[ISecurityGroup]securityGroupsList<ISecurityGroup>SecurityGroupsISecurityGroup[]SecurityGroups*[]ISecurityGroup= If not specified, the k8s endpoi…#default
Default: If not specified, the k8s endpoint is expected to be accessible publicly.