KubectlProviderProps Struct
Properties for a KubectlProvider.
| Source | aws-eks/lib/kubectl-provider.ts |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_eks as eks } from 'aws-cdk-lib';
declare const cluster: eks.Cluster;
const kubectlProviderProps: eks.KubectlProviderProps = {
cluster: cluster,
// the properties below are optional
removalPolicy: cdk.RemovalPolicy.DESTROY,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_eks as eks
# cluster: eks.Cluster
kubectl_provider_props = eks.KubectlProviderProps(
cluster=cluster,
# the properties below are optional
removal_policy=cdk.RemovalPolicy.DESTROY
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.eks.*;
Cluster cluster;
KubectlProviderProps kubectlProviderProps = KubectlProviderProps.builder()
.cluster(cluster)
// the properties below are optional
.removalPolicy(RemovalPolicy.DESTROY)
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.EKS;
Cluster cluster;
var kubectlProviderProps = new KubectlProviderProps {
Cluster = cluster,
// the properties below are optional
RemovalPolicy = RemovalPolicy.DESTROY
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"
var cluster Cluster
kubectlProviderProps := &KubectlProviderProps{
Cluster: cluster,
// the properties below are optional
RemovalPolicy: cdk.RemovalPolicy_DESTROY,
}
Properties
The cluster to control.
removalPolicyoptionalRemovalPolicyremoval_policyoptionalRemovalPolicyremovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicyRemovalPolicyoptionalRemovalPolicy = RemovalPolicy.DESTROY #The removal policy applied to the custom resource that provides kubectl.
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