aws-cdk-lib.aws_eks.KubernetesPatchProps

interface KubernetesPatchProps

LanguageType name
.NETAmazon.CDK.AWS.EKS.KubernetesPatchProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awseks#KubernetesPatchProps
Javasoftware.amazon.awscdk.services.eks.KubernetesPatchProps
Pythonaws_cdk.aws_eks.KubernetesPatchProps
TypeScript (source)aws-cdk-lib » aws_eks » KubernetesPatchProps

Properties for KubernetesPatch.

Example

declare const cluster: eks.Cluster;
new eks.KubernetesPatch(this, 'hello-kub-deployment-label', {
  cluster,
  resourceName: "deployment/hello-kubernetes",
  applyPatch: { spec: { replicas: 5 } },
  restorePatch: { spec: { replicas: 3 } },
})

Properties

NameTypeDescription
applyPatch{ [string]: any }The JSON object to pass to kubectl patch when the resource is created/updated.
clusterIClusterThe cluster to apply the patch to.
resourceNamestringThe full name of the resource to patch (e.g. deployment/coredns).
restorePatch{ [string]: any }The JSON object to pass to kubectl patch when the resource is removed.
patchType?PatchTypeThe patch type to pass to kubectl patch.
resourceNamespace?stringThe kubernetes API namespace.

applyPatch

Type: { [string]: any }

The JSON object to pass to kubectl patch when the resource is created/updated.


cluster

Type: ICluster

The cluster to apply the patch to.

[disable-awslint:ref-via-interface]


resourceName

Type: string

The full name of the resource to patch (e.g. deployment/coredns).


restorePatch

Type: { [string]: any }

The JSON object to pass to kubectl patch when the resource is removed.


patchType?

Type: PatchType (optional, default: PatchType.STRATEGIC)

The patch type to pass to kubectl patch.

The default type used by kubectl patch is "strategic".


resourceNamespace?

Type: string (optional, default: "default")

The kubernetes API namespace.