Skip to content

Commit 78555e1

Browse files
authored
chore: Update user data docs to correct mistake of showing bootstrap_extra_args when prepending user data (default AMI) (#1773)
1 parent 5818de1 commit 78555e1

3 files changed

Lines changed: 5 additions & 13 deletions

File tree

examples/user_data/main.tf

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,7 @@ module "eks_mng_linux_additional" {
1919
source = "../../modules/_user_data"
2020

2121
pre_bootstrap_user_data = <<-EOT
22-
echo "foo"
23-
export FOO=bar
24-
EOT
25-
26-
bootstrap_extra_args = "--kubelet-extra-args '--node-labels=node.kubernetes.io/lifecycle=spot'"
27-
28-
post_bootstrap_user_data = <<-EOT
29-
echo "All done"
22+
export CONTAINER_RUNTIME="containerd"
3023
EOT
3124
}
3225

@@ -41,11 +34,11 @@ module "eks_mng_linux_custom_ami" {
4134
enable_bootstrap_user_data = true
4235

4336
pre_bootstrap_user_data = <<-EOT
44-
echo "foo"
45-
export FOO=bar
37+
export CONTAINER_RUNTIME="containerd"
38+
export USE_MAX_PODS=false
4639
EOT
4740

48-
bootstrap_extra_args = "--kubelet-extra-args '--node-labels=node.kubernetes.io/lifecycle=spot'"
41+
bootstrap_extra_args = "--container-runtime containerd --kubelet-extra-args '--max-pods=20 --instance-type t3a.large'"
4942

5043
post_bootstrap_user_data = <<-EOT
5144
echo "All done"

modules/_user_data/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ When using an EKS managed node group, users have 2 primary routes for interactin
2121

2222
```hcl
2323
pre_bootstrap_user_data = "..."
24-
bootstrap_extra_args = "..."
2524
```
2625
2726
2. If the EKS managed node group does utilize a custom AMI, then per the [AWS documentation](https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html#launch-template-custom-ami), users will need to supply the necessary bootstrap configuration via user data to ensure that the node is configured to register with the cluster when launched. There are two routes that users can utilize to facilitate this bootstrapping process:

modules/_user_data/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ locals {
2828
cluster_endpoint = var.cluster_endpoint
2929
cluster_auth_base64 = var.cluster_auth_base64
3030
# Optional - is appended if using EKS managed node group without custom AMI
31-
# cluster_service_ipv4_cidr = var.cluster_service_ipv4_cidr # Not supported yet: https://github.com/bottlerocket-os/bottlerocket/issues/1866
31+
# cluster_service_ipv4_cidr = var.cluster_service_ipv4_cidr # Bottlerocket pulls this automatically https://github.com/bottlerocket-os/bottlerocket/issues/1866
3232
bootstrap_extra_args = var.bootstrap_extra_args
3333
}
3434
)) : ""

0 commit comments

Comments
 (0)