docs: Move examples that are more like test cases to the new tests/ directory; add better example configurations (#3069)

* chore: Move examples that are more like test cases to the new `tests/` directory

* chore: Stash

* feat: Add better examples for EKS managed node groups

* chore: Add better examples for self-managed node groups

* chore: Update docs and correct `nodegroup` to `node group`
This commit is contained in:
Bryant Biggs
2024-06-13 10:51:40 -04:00
committed by GitHub
parent 73b752a1e3
commit 323fb759d7
85 changed files with 509 additions and 109 deletions

View File

@@ -4,12 +4,12 @@ Configuration in this directory creates an AWS EKS cluster with [Karpenter](http
## Usage
To run this example you need to execute:
To provision the provided configurations you need to execute:
```bash
$ terraform init
$ terraform plan
$ terraform apply
$ terraform apply --auto-approve
```
Once the cluster is up and running, you can check that Karpenter is functioning as intended with the following command:
@@ -78,7 +78,7 @@ kubectl delete node -l karpenter.sh/provisioner-name=default
2. Remove the resources created by Terraform
```bash
terraform destroy
terraform destroy --auto-approve
```
Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources.

View File

@@ -62,7 +62,7 @@ module "eks" {
source = "../.."
cluster_name = local.name
cluster_version = "1.29"
cluster_version = "1.30"
# Gives Terraform identity admin access to cluster which will
# allow deploying resources (Karpenter) into the cluster
@@ -82,6 +82,7 @@ module "eks" {
eks_managed_node_groups = {
karpenter = {
ami_type = "AL2023_x86_64_STANDARD"
instance_types = ["m5.large"]
min_size = 2
@@ -146,7 +147,7 @@ resource "helm_release" "karpenter" {
repository_username = data.aws_ecrpublic_authorization_token.token.user_name
repository_password = data.aws_ecrpublic_authorization_token.token.password
chart = "karpenter"
version = "0.36.1"
version = "0.37.0"
wait = false
values = [
@@ -168,7 +169,7 @@ resource "kubectl_manifest" "karpenter_node_class" {
metadata:
name: default
spec:
amiFamily: AL2
amiFamily: AL2023
role: ${module.karpenter.node_iam_role_name}
subnetSelectorTerms:
- tags: