Skip to content

Commit 429a664

Browse files
committed
Update cdk stack with lambda layer for kubectl
1 parent 8912eb3 commit 429a664

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

PetAdoptions/cdk/pet_stack/lib/services.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import { CfnJson, RemovalPolicy, Fn, Duration, Stack, StackProps, CfnOutput } fr
3131
import { readFileSync } from 'fs';
3232
import 'ts-replace-all'
3333
import { TreatMissingData, ComparisonOperator } from 'aws-cdk-lib/aws-cloudwatch';
34+
import { KubectlLayer } from 'aws-cdk-lib/lambda-layer-kubectl';
3435

3536
export class Services extends Stack {
3637
constructor(scope: Construct, id: string, props?: StackProps) {
@@ -335,6 +336,7 @@ export class Services extends Stack {
335336
defaultCapacity: 2,
336337
defaultCapacityInstance: ec2.InstanceType.of(ec2.InstanceClass.T3, ec2.InstanceSize.MEDIUM),
337338
version: KubernetesVersion.of('1.27'),
339+
kubectlLayer: new KubectlLayer(this, 'kubectl')
338340
});
339341

340342
const clusterSG = ec2.SecurityGroup.fromSecurityGroupId(this,'ClusterSG',cluster.clusterSecurityGroupId);

0 commit comments

Comments
 (0)