antonputra/tutorials

Value defined in disk_size not being reflected

Closed this issue · 2 comments

hi @antonputra I am trying to setup eks cluster by following your tutorial on how to create eks cluster using terraform module. I setup the cluster and all and defined the disk_size value to 50. However only 20GB of ebs volume is being created and mounted to root directory. I suppose it should be 50 GB. I am using t3.2xlarge instance type
It would be great if provide some guidance on whats happening or what am i doing wrong.

CHAT GPT responded :

It sounds like you're using Terraform to provision an Amazon EKS cluster and are facing an issue with the EBS volume size not being as expected. Here are a few steps you can take to troubleshoot the issue:

  1. Check Terraform Configuration:
    Double-check your Terraform configuration to ensure that you have set the disk_size value correctly to 50GB for your EKS nodes. Make sure that you've applied the configuration correctly and that there are no typos or errors in the configuration.

  2. Instance Type and Storage:
    The t3.2xlarge instance type you mentioned uses EBS-backed storage, and it's possible that the default storage configuration might not be taking the disk_size into account. Make sure that the instance type you've chosen is indeed capable of accommodating the requested disk size.

  3. EKS Node Groups Configuration:
    If you're using EKS Managed Node Groups to provision your worker nodes, ensure that you've correctly specified the disk size in your Terraform configuration. The disk size should be defined within the launch_template block for the node group.

    Here's an example of how you might specify the disk size in your Terraform configuration:

    module "eks_cluster" {
      source = "path/to/eks-cluster-module"
    
      // Other module inputs...
    
      node_groups = {
        example_group = {
          // Other node group configurations...
          launch_template = {
            disk_size = 50
            // Other launch template configurations...
          }
        }
      }
    }
  4. Terraform Plan and Apply:
    After you've made sure the configuration is set correctly, run terraform plan to see the changes that Terraform will make. Check if the disk size is correctly configured in the plan output. If everything looks good, proceed to apply the changes using terraform apply.

  5. Check AWS Console:
    Once the cluster is created, navigate to the AWS Management Console and check the details of the EKS nodes. Verify the disk size of the root volume for the nodes and confirm if it matches your expectations.

  6. Review Documentation and Updates:
    EKS and Terraform are both evolving technologies, so it's possible that there might have been changes or updates to how things work. Make sure to check the latest documentation for both EKS and the Terraform EKS module you are using.

If you've tried these steps and still haven't resolved the issue, consider providing more details about your Terraform configuration, especially the relevant parts related to the node group and disk size configuration. This would help in diagnosing the problem more accurately.

As far as I remember, you would need to update the template for the nodes.