Skip to content

Commit 9f4faac

Browse files
committed
fix: Clean up and last minute changes for GA
1 parent b01f5d4 commit 9f4faac

File tree

19 files changed

+105
-68
lines changed

19 files changed

+105
-68
lines changed

README.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -276,17 +276,31 @@ module "eks" {
276276
277277
eks_managed_node_groups = {
278278
example = {
279+
# The EKS AL2023 NVIDIA AMI provides all of the necessary components
280+
# for accelerated workloads w/ EFA
281+
ami_type = "AL2023_x86_64_NVIDIA"
279282
instance_types = ["p5.48xlarge"]
280283
281284
# Exposes all EFA interfaces on the launch template created by the node group(s)
282285
# This would expose all 32 EFA interfaces for the p5.48xlarge instance type
283286
enable_efa_support = true
284287
285-
pre_bootstrap_user_data = <<-EOT
286-
# Mount NVME instance store volumes since they are typically
287-
# available on instance types that support EFA
288-
setup-local-disks raid0
289-
EOT
288+
# Mount instance store volumes in RAID-0 for kubelet and containerd
289+
# https://github.com/awslabs/amazon-eks-ami/blob/master/doc/USER_GUIDE.md#raid-0-for-kubelet-and-containerd-raid0
290+
cloudinit_pre_nodeadm = [
291+
{
292+
content_type = "application/node.eks.aws"
293+
content = <<-EOT
294+
---
295+
apiVersion: node.eks.aws/v1alpha1
296+
kind: NodeConfig
297+
spec:
298+
instance:
299+
localStorage:
300+
strategy: RAID0
301+
EOT
302+
}
303+
]
290304
291305
# EFA should only be enabled when connecting 2 or more nodes
292306
# Do not use EFA on a single node workload

examples/eks-auto-mode/README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,16 @@
55
To provision the provided configurations you need to execute:
66

77
```bash
8-
$ terraform init
9-
$ terraform plan
10-
$ terraform apply --auto-approve
8+
terraform init
9+
terraform plan
10+
terraform apply --auto-approve
11+
```
12+
13+
Once the cluster has finished provisioning, you can use the `kubectl` command to interact with the cluster. For example, to deploy a sample deployment and see EKS Auto Mode in action, run:
14+
15+
```bash
16+
aws eks update-kubeconfig --name $(terraform output -raw cluster_name)
17+
kubectl apply -f deployment.yaml
1118
```
1219

1320
Note that this example may create resources which cost money. Run `terraform destroy` when you don't need these resources.

examples/eks-auto-mode/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: Deployment
33
metadata:
44
name: inflate
55
spec:
6-
replicas: 0
6+
replicas: 3
77
selector:
88
matchLabels:
99
app: inflate

examples/eks-hybrid-nodes/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## Usage
44

5+
> [!NOTE]
6+
> The [Packer CLI](https://developer.hashicorp.com/packer/tutorials/docker-get-started/get-started-install-cli) is required to build a custom AMI for the Hybrid node used in the example.
7+
58
To provision the provided configurations you need to execute:
69

710
```bash

examples/eks-hybrid-nodes/ami/plugins.pkr.hcl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,5 @@ packer {
44
version = "~> 1.2"
55
source = "github.com/hashicorp/amazon"
66
}
7-
ansible = {
8-
version = "~> 1.1"
9-
source = "github.com/hashicorp/ansible"
10-
}
117
}
128
}

examples/eks-hybrid-nodes/ami/variables.pkr.hcl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
variable "ami_name_prefix" {
22
description = "The prefix to use when creating the AMI name. i.e. - `<ami_name_prefix>-<eks_version>-<architecture>-<timestamp>"
33
type = string
4-
default = "amazon-eks-ubuntu"
4+
default = "eks-hybrid-ubuntu"
55
}
66

77
variable "eks_version" {
88
description = "The EKS cluster version associated with the AMI created"
99
type = string
10-
default = "1.30"
10+
default = "1.31"
1111
}
1212

1313
variable "credential_provider" {
@@ -42,7 +42,7 @@ variable "ami_block_device_mappings" {
4242
variable "ami_description" {
4343
description = "The description to use when creating the AMI"
4444
type = string
45-
default = "Amazon EKS Ubuntu Hybrid Node AMI"
45+
default = "EKS Hybrid Node demonstration AMI"
4646
}
4747

4848
variable "ami_groups" {
@@ -651,7 +651,6 @@ variable "temporary_iam_instance_profile_policy_document" {
651651
Effect = "Allow"
652652
Action = [
653653
"ec2:Describe*",
654-
"s3:Get*",
655654
]
656655
Resource = ["*"]
657656
},

examples/eks-hybrid-nodes/remote.tf

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,6 @@ provider "aws" {
1010
module "eks_hybrid_node_role" {
1111
source = "../../modules/hybrid-node-role"
1212

13-
policy_statements = [
14-
{
15-
actions = [
16-
"s3:Get*",
17-
"s3:List*",
18-
]
19-
resources = ["*"]
20-
}
21-
]
22-
2313
tags = local.tags
2414
}
2515

examples/eks-managed-node-group/main.tf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@ provider "aws" {
22
region = local.region
33
}
44

5-
data "aws_availability_zones" "available" {}
5+
data "aws_availability_zones" "available" {
6+
# Exclude local zones
7+
filter {
8+
name = "opt-in-status"
9+
values = ["opt-in-not-required"]
10+
}
11+
}
612

713
locals {
814
name = "ex-eks-mng"

examples/karpenter/main.tf

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,14 @@ provider "kubectl" {
3535
}
3636
}
3737

38-
data "aws_availability_zones" "available" {}
38+
data "aws_availability_zones" "available" {
39+
# Exclude local zones
40+
filter {
41+
name = "opt-in-status"
42+
values = ["opt-in-not-required"]
43+
}
44+
}
45+
3946
data "aws_ecrpublic_authorization_token" "token" {
4047
provider = aws.virginia
4148
}

examples/self-managed-node-group/main.tf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@ provider "aws" {
22
region = local.region
33
}
44

5-
data "aws_availability_zones" "available" {}
5+
data "aws_availability_zones" "available" {
6+
# Exclude local zones
7+
filter {
8+
name = "opt-in-status"
9+
values = ["opt-in-not-required"]
10+
}
11+
}
612

713
locals {
814
name = "ex-self-mng"

0 commit comments

Comments
 (0)