# KubectlProviderProps

Properties for a KubectlProvider.

Extends: KubectlProviderProps
Used as props by: KubectlProvider

- Source: [`aws-eks/lib/kubectl-provider.ts`](https://github.com/aws/aws-cdk/blob/v2.276.0/packages/aws-cdk-lib/aws-eks/lib/kubectl-provider.ts#L16)
- Type last changed: v2.238.0 · 9 Feb 2026

## 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,
};
```

## Properties

- `cluster`: [ICluster](/cdk/api/v2/docs/aws-cdk-lib.aws_eks.ICluster.html) (required) — The cluster to control.

- `removalPolicy`: [RemovalPolicy](/cdk/api/v2/docs/aws-cdk-lib.RemovalPolicy.html) = RemovalPolicy.DESTROY — The 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
