Comments (4)
- You have disabled the custom launch template which is the only way that these customizations, such as user data, are supported
- If you are mounting the instance store volumes, there are provisions within the EKS AL2 AMI to support this already https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/9a0ca42fde8c2e11acacbc1a891885d840009d34/patterns/nvidia-gpu-efa/eks.tf#L37-L43
from terraform-aws-eks.
@bryantbiggs deployed your suggestion for mounting the instance store volumes using an AL2 AMI, however I am still having trouble mounting the instance store. Some of my pods require instance store volume to be mounted and they are still complaining that the volumes are not present. Is there any wrong with the way I am using the parameter pre_bootstrap_user_data
?
2024-05-14T07:41:44.506522Z topo-lvm-sc-topolvm-lvmd-0-lmz2c lvmd error: "Volume group not found:" volume_group="instancestore"
This is my updated terraform code
module "eks" {
source = "terraform-aws-modules/eks/aws"
version = "~> 20.0"
cluster_name = var.cluster_name
cluster_version = var.cluster_version
subnet_ids = var.private_subnets
control_plane_subnet_ids = var.intra_subnets
vpc_id = var.vpc_id
enable_cluster_creator_admin_permissions = true
authentication_mode = "API_AND_CONFIG_MAP"
cluster_endpoint_public_access = true
cluster_enabled_log_types = ["api", "audit", "authenticator", "controllerManager", "scheduler"]
kms_key_administrators = [data.aws_caller_identity.current.arn]
kms_key_owners = [data.aws_caller_identity.current.arn]
cluster_addons = {
coredns = {
most_recent = true
}
kube-proxy = {
most_recent = true
}
vpc-cni = {
most_recent = true
before_compute = true
configuration_values = jsonencode({
env = {
ENABLE_PREFIX_DELEGATION = "true"
WARM_PREFIX_TARGET = "1"
}
})
}
}
iam_role_additional_policies = {
"ssm_managed_core" = "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore"
}
eks_managed_node_groups = {
ingest_node_group = {
name = "ingest"
use_name_prefix = true
ami_type = "AL2_x86_64"
subnet_ids = var.private_subnets
vpc_security_group_ids = [
module.eks.node_security_group_id,
]
min_size = var.node_min_capacity
max_size = var.node_max_capacity
desired_size = var.node_desired_capacity
instance_types = [var.instance_type]
use_custom_launch_template = false
disk_size = 200
pre_bootstrap_user_data = <<-EOT
#!/usr/bin/env bash
# Mount instance store volumes in RAID-0 for kubelet and containerd
# https://github.com/awslabs/amazon-eks-ami/blob/master/doc/USER_GUIDE.md#raid-0-for-kubelet-and-containerd-raid0
/bin/setup-local-disks raid0
EOT
timeouts = {
delete = "1h"
}
labels = {
GithubRepo = "terraform-aws-eks"
GithubOrg = "terraform-aws-modules"
managed_by = "terraform"
k8s-app = "ingest"
storageclass = "nvme"
}
}
var = var.tags
}
from terraform-aws-eks.
once you've mount the instance store volume(s), you can use them by specifying the necessary ephemeral storage required in your request/limits
unfortunately the code you have provided is littered with variables so its impossible to know what is being configured and how
from terraform-aws-eks.
Sorry for wasting your time.
For folks who look at this post in the future trying to find an answer I recommend not setting use_custom_launch_template = false
and it should work. I am using an instance of type i3.2xlarge which is equipped with NMM2-based SSD instance store volumes by default.
Confirm that the instance store volume is being utilized and configured as part of a RAID0 array and mounted by running the lsblk
utility on your linux instance.
sh-4.2$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 20G 0 disk
└─xvda1 202:1 0 20G 0 part /
nvme0n1 259:0 0 1.7T 0 disk
└─md127 9:127 0 1.7T 0 raid0 /mnt/k8s-disks/0
from terraform-aws-eks.
Related Issues (20)
- EKS should be recreated when changing the value of create_kms_key HOT 1
- The module should support eks add-ons deploy flag HOT 7
- eks-managed-node-group requires cluster_service_cidr when use_custom_launch_template = false HOT 1
- Module argument cluster_encryption_config does not handle a null value HOT 1
- No way to tackle Karpenter when KMS is mandatory by default HOT 22
- fargate-profile: restrict role access based on SourceArn (or custom assume_role_policy) HOT 2
- Error: waiting for Security Group with node_security_group_additional_rules HOT 2
- Unable to update Node Groups in place with cluster placement group strategy without EFA HOT 3
- Allow tags in metadata and launch template tags not being applied to eks managed launch template HOT 2
- accessEntries not removed on node group(s) deletion HOT 3
- ERROR: The cluster's authentication mode must be set to one of [API, API_AND_CONFIG_MAP] to perform this operation. HOT 2
- Log rotation configuration. HOT 1
- Should be able to configure "cluster-dns-ip" HOT 1
- Changing authentication_mode in latest module version does not result in any changes to infrastructure HOT 1
- Request to do not include other terraform-aws-modules inside the terraform-aws-eks HOT 7
- karpenter: `iam:PassedToService` has to be `ec2.amazonaws.com.cn` in AWS China
- how to assign additional security groups to a node HOT 1
- Access entry for aws console HOT 6
- Self-Managed Node Groups Not Joining EKS Cluster (CoreDNS 'DEGRADE' Error) HOT 23
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-aws-eks.