{"id":13893852,"url":"https://github.com/aws-samples/cdk-eks-karpenter","last_synced_at":"2025-12-13T15:05:57.720Z","repository":{"id":37021314,"uuid":"463506195","full_name":"aws-samples/cdk-eks-karpenter","owner":"aws-samples","description":"CDK construct for installing and configuring Karpenter on EKS clusters","archived":false,"fork":false,"pushed_at":"2025-12-01T21:56:17.000Z","size":1468,"stargazers_count":46,"open_issues_count":12,"forks_count":20,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-04T03:23:07.434Z","etag":null,"topics":["aws","cdk","eks","karpenter","kubernetes"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aws-samples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-02-25T11:23:29.000Z","updated_at":"2025-10-27T17:53:38.000Z","dependencies_parsed_at":"2024-07-22T10:23:23.852Z","dependency_job_id":"dce64858-2ce1-4aec-b797-63dacd879648","html_url":"https://github.com/aws-samples/cdk-eks-karpenter","commit_stats":{"total_commits":57,"total_committers":5,"mean_commits":11.4,"dds":0.4736842105263158,"last_synced_commit":"5bfa89dbebbd51f50ff3063f18a636a4bf2b4c0e"},"previous_names":[],"tags_count":62,"template":false,"template_full_name":"amazon-archives/__template_Apache-2.0","purl":"pkg:github/aws-samples/cdk-eks-karpenter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-samples%2Fcdk-eks-karpenter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-samples%2Fcdk-eks-karpenter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-samples%2Fcdk-eks-karpenter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-samples%2Fcdk-eks-karpenter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aws-samples","download_url":"https://codeload.github.com/aws-samples/cdk-eks-karpenter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws-samples%2Fcdk-eks-karpenter/sbom","scorecard":{"id":219327,"data":{"date":"2025-08-11","repo":{"name":"github.com/aws-samples/cdk-eks-karpenter","commit":"dda28c7f8e655c04a64415b3cb59d8475c6e8afd"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/21 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"13 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":8,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/build.yml:11","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/build.yml:61","Info: found token with 'none' permissions: .github/workflows/build.yml:1","Info: found token with 'none' permissions: .github/workflows/build.yml:1","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/release.yml:13","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/release.yml:54","Info: jobLevel 'contents' permission set to 'read': .github/workflows/release.yml:83","Info: jobLevel 'contents' permission set to 'read': .github/workflows/release.yml:116","Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/pull-request-lint.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/aws-samples/cdk-eks-karpenter/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/aws-samples/cdk-eks-karpenter/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/aws-samples/cdk-eks-karpenter/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/aws-samples/cdk-eks-karpenter/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/aws-samples/cdk-eks-karpenter/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/aws-samples/cdk-eks-karpenter/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:94: update your workflow using https://app.stepsecurity.io/secureworkflow/aws-samples/cdk-eks-karpenter/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:98: update your workflow using https://app.stepsecurity.io/secureworkflow/aws-samples/cdk-eks-karpenter/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:119: update your workflow using https://app.stepsecurity.io/secureworkflow/aws-samples/cdk-eks-karpenter/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:122: update your workflow using https://app.stepsecurity.io/secureworkflow/aws-samples/cdk-eks-karpenter/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:126: update your workflow using https://app.stepsecurity.io/secureworkflow/aws-samples/cdk-eks-karpenter/build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pull-request-lint.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/aws-samples/cdk-eks-karpenter/pull-request-lint.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/aws-samples/cdk-eks-karpenter/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/aws-samples/cdk-eks-karpenter/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/aws-samples/cdk-eks-karpenter/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/aws-samples/cdk-eks-karpenter/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:61: update your workflow using https://app.stepsecurity.io/secureworkflow/aws-samples/cdk-eks-karpenter/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:86: update your workflow using https://app.stepsecurity.io/secureworkflow/aws-samples/cdk-eks-karpenter/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:90: update your workflow using https://app.stepsecurity.io/secureworkflow/aws-samples/cdk-eks-karpenter/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:119: update your workflow using https://app.stepsecurity.io/secureworkflow/aws-samples/cdk-eks-karpenter/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:122: update your workflow using https://app.stepsecurity.io/secureworkflow/aws-samples/cdk-eks-karpenter/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:126: update your workflow using https://app.stepsecurity.io/secureworkflow/aws-samples/cdk-eks-karpenter/release.yml/main?enable=pin","Info:   0 out of  21 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/aws-samples/.github/SECURITY.md:1","Info: Found linked content: github.com/aws-samples/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/aws-samples/.github/SECURITY.md:1","Info: Found text in security policy: github.com/aws-samples/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 10 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-qq4x-c6h6-rfxh","Warn: Project is vulnerable to: GHSA-5pq3-h73f-66hr","Warn: Project is vulnerable to: GHSA-qc59-cxj2-c2w4","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T02:11:22.512Z","repository_id":37021314,"created_at":"2025-08-17T02:11:22.512Z","updated_at":"2025-08-17T02:11:22.512Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27707695,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-13T02:00:09.769Z","response_time":147,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","cdk","eks","karpenter","kubernetes"],"created_at":"2024-08-06T18:01:18.467Z","updated_at":"2025-12-13T15:05:57.702Z","avatar_url":"https://github.com/aws-samples.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# cdk-eks-karpenter\n\nThis construct configures the necessary dependencies and installs [Karpenter](https://karpenter.sh)\non an EKS cluster managed by AWS CDK.\n\n## Prerequisites\n\n### Usage with EC2 Spot Capacity\n\nIf you have not used EC2 spot in your AWS account before, follow the instructions\n[here](https://karpenter.sh/v0.31/getting-started/getting-started-with-karpenter/#3-create-a-cluster) to create\nthe service linked role in your account allowing Karpenter to provision EC2 Spot Capacity.\n\n## Using\n\nIn your CDK project, initialize a new Karpenter construct for your EKS cluster, like this:\n\n```typescript\nconst cluster = new Cluster(this, 'testCluster', {\n  vpc: vpc,\n  role: clusterRole,\n  version: KubernetesVersion.V1_27,\n  defaultCapacity: 1\n});\n\nconst karpenter = new Karpenter(this, 'Karpenter', {\n  cluster: cluster,\n  namespace: \"kube-system\"\n});\n```\n\nThis will install and configure Karpenter in your cluster. To have Karpenter do something useful, you\nalso need to create an [EC2NodeClass](https://karpenter.sh/docs/concepts/nodeclasses/) and an\n[NodePool](https://karpenter.sh/docs/concepts/nodepools/), for a more complete example, see\n[test/integ.karpenter.ts](./test/integ.karpenter.ts).\n\n## Known issues\n\n### It is now a best practice to install Karpenter into the kube-system namespace:\nKapenter CRD webhooks have 'kube-system' hard-coded into them, and do not work in other namespaces (such as 'karpenter')\n\n### Versions earlier than v0.6.1 fails to install\n\nAs of [aws/karpenter#1145](https://github.com/aws/karpenter/pull/1145) the Karpenter Helm chart is\nrefactored to specify `clusterEndpoint` and `clusterName` on the root level of the chart values, previously\nthese values was specified under the key `controller`.\n\n## Testing\n\nThis construct adds a custom task to [projen](https://projen.io/), so you can test a full deployment\nof an EKS cluster with Karpenter installed as specified in `test/integ.karpenter.ts` by running the\nfollowing:\n\n```sh\nexport CDK_DEFAULT_REGION=\u003caws region\u003e\nexport CDK_DEFAULT_ACCOUNT=\u003caccount id\u003e\nnpx projen test:deploy\n```\n\nAs the above will create a cluster without EC2 capacity, with CoreDNS and Karpenter running as Fargate\npods, you can test out the functionality of Karpenter by deploying an inflation deployment, which will\nspin up a number of pods that will trigger Karpenter creation of worker nodes:\n\n```sh\nkubectl apply -f test/inflater-deployment.yml\n```\n\nYou can clean things up by deleting the deployment and the CDK test stack:\n\n```sh\nkubectl delete -f test/inflater-deployment.yml\nnpx projen test:destroy\n```\n\n## FAQ\n\n### I'm not able to launch spot instances\n\n1. Ensure you have the appropriate linked role available in your account, for more details,\n  see [the karpenter documentation](https://karpenter.sh/v0.31/getting-started/getting-started-with-karpenter/#3-create-a-cluster)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws-samples%2Fcdk-eks-karpenter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faws-samples%2Fcdk-eks-karpenter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws-samples%2Fcdk-eks-karpenter/lists"}