Skip to content

cdklabs/awscdk-asset-kubectl

Lambda Layer with KubeCtl v1.29


cdk-constructs: Stable


This module exports a single class called KubectlV29Layer which is a lambda.LayerVersion that bundles the kubectl and the helm command line.

  • Helm Version: 3.14.0
  • Kubectl Version: 1.29.1

Usage:

// KubectlLayer bundles the 'kubectl' and 'helm' command lines
import { KubectlV29Layer } from '@aws-cdk/lambda-layer-kubectl-v29';
import * as lambda from 'aws-cdk-lib/aws-lambda';

declare const fn: lambda.Function;
const kubectl = new KubectlV29Layer(this, 'KubectlLayer');
fn.addLayers(kubectl);

kubectl will be installed under /opt/kubectl/kubectl, and helm will be installed under /opt/helm/helm.