-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
Description
I need to do 2 things:
- Increase
disk_size
to 30Gb. It is ok but it interfere the following point. - Use bottlerocket with a custom configuration. It needs launch template.
So, I see in variables.tf and in documentation that "Disk size is only valid when use_custom_launch_template
= false
". Therefore I can't use disk_size because of the second point and I must use launch_template. Ok, let's go deeper. I've tried two versions:
eks_managed_node_group_defaults = {
use_custom_launch_template = true
ami_type = "BOTTLEROCKET_x86_64"
bootstrap_extra_args = templatefile("${path.module}/bootstrap.toml", {aws_account_id = var.aws_account_id, aws_region=var.aws_region})
block_device_mappings = [
{
device_name = "/dev/xvdb"
ebs = {
volume_size = 30
}
}
]
}
This version gives me an error "InvalidRequestException: The parameter iops is not supported for gp2 volumes." but iops is not specified. And if I specify not gp2 but gp3 volume with iops, it stucks inifinitely with an error message: Instances failed to join the kubernetes cluster
.
eks_managed_node_group_defaults = {
use_custom_launch_template = true
ami_type = "BOTTLEROCKET_x86_64"
bootstrap_extra_args = templatefile("${path.module}/bootstrap.toml", {aws_account_id = var.aws_account_id, aws_region=var.aws_region})
block_device_mappings = [
{
device_name = "/dev/xvdb"
ebs = {
volume_size = 30
volume_type = "gp3"
iops = 100
}
}
]
}
I think, the problem can be with overriding device name: /dev/xvdb
may be reserved for images, ephemeral-storage and logs. That's why it stucks or can't be created at all.
Versions
- Module version [Required]:
20.37.1
- Terraform version:
v1.12.2
- Provider version(s):
v5.100.0
Expected behavior
bootstrap_extra_args
parameter can get along with increased disk size.
Actual behavior
Instances failed to join the kubernetes cluster.
Additional context
I need to override launch_template because it's not possible to follow SOC2 rules/checks without providing bootstrap extra args. And I need to increase disk size because 20 Gb disks give me a lot of messages about Kubelet Disk Pressure and 30 Gb disks don't. This is because low capacity of ephemeral storage. And I need high capacity of ephemeral storage because kubescape and trivy stores its reports and vulnerability signatures there.