VPC Configuration
Last updated
Last updated
When setting up your Amazon EKS (Elastic Kubernetes Service) cluster, the first step involves selecting a Virtual Private Cloud (VPC) for your node groups. You have two primary options:
Generate a New VPC for this Cluster: This option allows you to create a new VPC specifically tailored for your EKS cluster. This is beneficial if you want to isolate your cluster's resources and ensure that network configurations are optimized for your workload.
Use an Existing VPC: If you already have a VPC set up, you can choose to share it with your cluster. This option is useful for leveraging existing network configurations, security groups, and subnets without the overhead of creating a new VPC.
If you opt to use an existing VPC, you must specify the subnets associated with that VPC. It's essential to select at least two subnet IDs from the available options. This requirement ensures that your EKS cluster can distribute its nodes across multiple Availability Zones (AZs), enhancing availability and fault tolerance.
Configuring your node groups is crucial for managing the resources allocated to your EKS cluster. Here are the key settings:
Min Node: Specify the minimum number of nodes that should always be running in your node group (e.g., 1). This ensures that there is always at least one node available to handle workloads.
Desired Node: Define the desired number of nodes (e.g., 3). This is the target number of nodes that you want to maintain in your node group under normal conditions.
Max Node: Set the maximum number of nodes (e.g., 5). This cap prevents excessive resource utilization and costs by limiting how many nodes can be provisioned.
You also need to configure the instance settings for your node groups:
Instance Family: Choose an instance category based on your workload requirements (e.g., t3a
, m5
). Different families offer varying performance characteristics and pricing.
Instance Type: Select a specific instance type within the chosen family (e.g., t3a.large
, c5.xlarge
). The type affects CPU, memory, and network performance.
Capacity Type: Decide between two capacity types:
ON_DEMAND: Pay for compute capacity by the hour without any long-term commitments. This option provides flexibility but may be more expensive.
SPOT: Purchase unused capacity at potentially lower prices. Spot instances can significantly reduce costs but may be interrupted if AWS needs the capacity back.
You can clone the current node group configuration to create a similar additional node group.
Alternatively, you can create a new node group and modify its settings as required.
Choose from the provided configuration options to customize each node group.
When deploying your EKS cluster, keep in mind that multiple node groups will be created based on the configurations provided. It’s crucial to select appropriate VPCs and subnets to ensure proper network configuration and resource allocation. Proper planning in this step helps avoid issues related to connectivity, security, and resource management in your Kubernetes environment.
By carefully configuring these settings, you can optimize performance, manage costs effectively, and ensure high availability for your applications running on Amazon EKS.