mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-20 16:43:46 +01:00
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:
@@ -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.
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user