How to upsize volume of Terraformed EKS node
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Introduction
Amazon EKS (Elastic Kubernetes Service) provides a robust platform for deploying and managing containerized applications using Kubernetes on AWS infrastructure. One of the common tasks in managing a Kubernetes cluster is adjusting the resources available to node instances. As your workload increases, you may find the need to upsize the volume of EKS nodes. This involves increasing the storage that each node can utilize. In this article, we'll delve into the steps and considerations for upsizing node volumes in a terraformed EKS environment, integrating technical explanations and configurations.
Understanding EKS Node Volumes
EKS nodes are typically EC2 instances that constitute the worker nodes of your cluster. Each of these nodes mounts storage volumes, usually based on Amazon EBS (Elastic Block Store). The storage size influences how much data can be handled, directly impacting application scalability and performance.
Key Concepts
- EKS Cluster: A group of nodes managed by Kubernetes.
- Node Groups: Collections of EC2 instances used as worker nodes in the EKS cluster.
- EBS Volumes: Scalable storage volumes attached to EC2 instances.
- Terraform: An Infrastructure as Code tool that allows you to build, change, and version infrastructure safely and efficiently.
Prerequisites
Before proceeding, ensure you have:
- Terraform installed and configured.
- AWS CLI configured with necessary permissions.
- An existing Terraform codebase managing your EKS infrastructure.
Steps to Upsize EKS Node Volume
Step 1: Identifying the EKS Node Group Configuration
Examine your Terraform configuration files to locate the definition for your EKS node groups. This typically involves `aws_eks_node_group` or a similar custom module.
- Downtime: Replacing nodes will result in some temporary downtime.
- Data Persistence: Nodes with pods requiring persistent storage should be carefully managed to prevent data loss.
- Costs: Larger volumes might incur higher costs, ensure budget alignment.
- Nodes not updating: Ensure you are using the correct IAM roles and sufficient permissions.
- Volume attachment errors: If the volume fails to attach, check for VPC, subnet, or AZ mismatches.
- State mismatch: If Terraform state is incorrect, consider using `terraform state` commands to reconcile.
Related reading
- How to use aggregate functions in Amazon Dynamodb
- How to use Amazon Cognito without Amplify
- How to use auto increment for primary key id in dynamodb
- How to use aws-cli with local dynamoDB ?
- How to use an init container to check if MySQL is ready for connections?
- How to use AWS account_id variable in Terraform
- How to use AWS IoT to send/receive messages to/from Web Browser
- How to use aws nlb with nginx ingress controller for ssl

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.