Terraform EKS submodule: eks managed node groups
(Redirected from Module.eks managed node group)
Jump to navigation
Jump to search
Terraform EKS module: eks_managed_node_groups
submodule and
- Submodule: https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest/submodules/eks-managed-node-group
- Input: https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest#input_eks_managed_node_groups
- https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest/submodules/eks-managed-node-group?tab=inputs
- Example: https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest/examples/eks_managed_node_group
Contents
Inputs[edit]
Examples[edit]
eks_managed_node_groups = { one = { name = "node-group-1" instance_types = ["t3.small"] min_size = 1 max_size = 3 desired_size = 2 # https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/docs/faq.md#why-are-there-no-changes-when-a-node-groups-desired_size-is-modified pre_bootstrap_user_data = <<-EOT echo 'foo bar' EOT vpc_security_group_ids = [ aws_security_group.node_group_one.id ] } two = { name = "node-group-2" instance_types = ["t3.medium"] min_size = 1 max_size = 2 desired_size = 1 pre_bootstrap_user_data = <<-EOT echo 'foo bar' EOT vpc_security_group_ids = [ aws_security_group.node_group_two.id ] } }
module "eks_managed_node_group" { source = "terraform-aws-modules/eks/aws//modules/eks-managed-node-group" name = "separate-eks-mng" cluster_name = "my-cluster" cluster_version = "1.24" subnet_ids = ["subnet-abcde012", "subnet-bcde012a", "subnet-fghi345a"] // The following variables are necessary if you decide to use the module outside of the parent EKS module context. // Without it, the security groups of the nodes are empty and thus won't join the cluster. cluster_primary_security_group_id = module.eks.cluster_primary_security_group_id vpc_security_group_ids = [module.eks.node_security_group_id] // Note: `disk_size`, and `remote_access` can only be set when using the EKS managed node group default launch template // This module defaults to providing a custom launch template to allow for custom security groups, tag propagation, etc. // use_custom_launch_template = false // disk_size = 50 // // # Remote access cannot be specified with a launch template // remote_access = { // ec2_ssh_key = module.key_pair.key_pair_name // source_security_group_ids = [aws_security_group.remote_access.id] // } min_size = 1 max_size = 10 desired_size = 1 instance_types = ["t3.large"] capacity_type = "SPOT" labels = { Environment = "test" GithubRepo = "terraform-aws-eks" GithubOrg = "terraform-aws-modules" } taints = { dedicated = { key = "dedicated" value = "gpuGroup" effect = "NO_SCHEDULE" } } tags = { Environment = "dev" Terraform = "true" } }
Errors[edit]
│ Error: error updating EKS Node Group (your-ng:node_default-20230320234324234001) config: InvalidParameterException: Minimum capacity 2 can't be greater than desired size 1
module.eks.module.eks_managed_node_group["one"].aws_eks_node_group.this[0]: Destruction complete after 6m16s
Related[edit]
eks-cluster.tf
- FAQ: https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/docs/faq.md#why-are-there-no-changes-when-a-node-groups-desired_size-is-modified
taints
- Terraform resource:
aws_eks_node_group
Terraform submodule
metadata options
self_managed_node_groups
- AWS EKS nodes
- module.eks.module.eks_managed_node_group
- Still destroying ...
See also[edit]
eks_managed_node_groups: desired_size, min_size, max_size, use_custom_launch_template
module.eks_managed_node_group
module.eks: eks_managed_node_group, oidc_provider
- Terraform EKS module:
manage_aws_auth_configmap, create_aws_auth_configmap, aws_auth_roles, aws_auth_users, aws_auth_accounts, module.eks, Amazon EKS Blueprints for Terraform, OIDC
Advertising: