KubectlProviderOptions
- class aws_cdk.aws_eks_v2_alpha.KubectlProviderOptions(*, kubectl_layer, awscli_layer=None, environment=None, memory=None, private_subnets=None, role=None, security_group=None)
Bases:
object- Parameters:
kubectl_layer (
ILayerVersion) – (experimental) An AWS Lambda layer that includeskubectlandhelm.awscli_layer (
Optional[ILayerVersion]) – (experimental) An AWS Lambda layer that contains theawsCLI. If not defined, a default layer will be used containing the AWS CLI 2.x.environment (
Optional[Mapping[str,str]]) – (experimental) Custom environment variables when runningkubectlagainst this cluster.memory (
Optional[Size]) – (experimental) The amount of memory allocated to the kubectl provider’s lambda function.private_subnets (
Optional[Sequence[ISubnet]]) – (experimental) Subnets to host thekubectlcompute resources. If not specified, the k8s endpoint is expected to be accessible publicly.role (
Optional[IRole]) – (experimental) An IAM role that can perform kubectl operations against this cluster. The role should be mapped to thesystem:mastersKubernetes 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.security_group (
Optional[ISecurityGroup]) – (experimental) A security group to use forkubectlexecution. Default: - If not specified, the k8s endpoint is expected to be accessible publicly.
- Stability:
experimental
- ExampleMetadata:
infused
Example:
from aws_cdk.lambda_layer_kubectl_v33 import KubectlV33Layer cluster = eks.Cluster(self, "hello-eks", version=eks.KubernetesVersion.V1_33, kubectl_provider_options=eks.KubectlProviderOptions( kubectl_layer=KubectlV33Layer(self, "kubectl"), environment={ "http_proxy": "http://proxy.myproxy.com" } ) )
Attributes
- awscli_layer
(experimental) An AWS Lambda layer that contains the
awsCLI.If not defined, a default layer will be used containing the AWS CLI 2.x.
- Stability:
experimental
- environment
(experimental) Custom environment variables when running
kubectlagainst this cluster.- Stability:
experimental
- kubectl_layer
(experimental) An AWS Lambda layer that includes
kubectlandhelm.- Stability:
experimental
- memory
(experimental) The amount of memory allocated to the kubectl provider’s lambda function.
- Stability:
experimental
- private_subnets
(experimental) Subnets to host the
kubectlcompute resources.If not specified, the k8s endpoint is expected to be accessible publicly.
- Stability:
experimental
- role
(experimental) An IAM role that can perform kubectl operations against this cluster.
The role should be mapped to the
system:mastersKubernetes 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.
- Stability:
experimental
- security_group
(experimental) A security group to use for
kubectlexecution.- Default:
If not specified, the k8s endpoint is expected to be accessible
publicly.
- Stability:
experimental