From e12ecb1c715ef0bd382a26435dcf0da9c90a0aa7 Mon Sep 17 00:00:00 2001 From: Kazuho Cryer-Shinozuka Date: Wed, 17 Jul 2024 09:45:15 +0900 Subject: [PATCH] docs(eks): add documentation about add-ons (#30815) ### Issue # (if applicable) None ### Reason for this change Addon L2 construct is added by #30576 but there is no documentation about it in the README.md. ### Description of changes Add Add-ons documentation to README.md ### Description of how you validated changes None ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/aws-cdk-lib/aws-eks/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/packages/aws-cdk-lib/aws-eks/README.md b/packages/aws-cdk-lib/aws-eks/README.md index 8a8bce08726e0..f9da36c3133bd 100644 --- a/packages/aws-cdk-lib/aws-eks/README.md +++ b/packages/aws-cdk-lib/aws-eks/README.md @@ -55,6 +55,7 @@ In addition, the library also supports defining Kubernetes resource manifests wi - [Manually importing k8s specs and CRD's](#manually-importing-k8s-specs-and-crds) - [Patching Kubernetes Resources](#patching-kubernetes-resources) - [Querying Kubernetes Resources](#querying-kubernetes-resources) + - [Add-ons](#add-ons) - [Using existing clusters](#using-existing-clusters) - [Logging](#logging) - [Known Issues and Limitations](#known-issues-and-limitations) @@ -1837,6 +1838,20 @@ declare const cluster: eks.Cluster; const loadBalancerAddress = cluster.getServiceLoadBalancerAddress('my-service'); ``` +## Add-ons + +[Add-ons](https://docs.aws.amazon.com/eks/latest/userguide/eks-add-ons.html) is a software that provides supporting operational capabilities to Kubernetes applications. The EKS module supports adding add-ons to your cluster using the `eks.Addon` class. + +```ts +declare const cluster: eks.Cluster; + +new eks.Addon(this, 'Addon', { + cluster, + addonName: 'aws-guardduty-agent', + addonVersion: 'v1.6.1', +}); +``` + ## Using existing clusters The Amazon EKS library allows defining Kubernetes resources such as [Kubernetes