Editing Terraform EKS submodule: eks managed node groups

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
[[Terraform EKS module]]: <code>eks_managed_node_groups</code> submodule and
+
[[Terraform EKS module]]: <code>eks_managed_node_groups</code>
* <code>[[eks_managed_node_group_defaults]]</code> <code>[[eks_managed_node_group]]</code> input from [[Terraform EKS module]]
 
  
 
* Submodule: https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest/submodules/eks-managed-node-group
 
* 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
 
* 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
 
* Example: https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest/examples/eks_managed_node_group
  
  
== Inputs ==
+
<code>module.eks_managed_node_group</code>
https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest/submodules/eks-managed-node-group?tab=inputs
+
 
* <code>[[instance_types]]: [[min_size]], [[max_size]], [[desired_size]]</code></code>
+
 
* <code>[[use_custom_launch_template]]</code>
+
<code>[[module.]]eks_managed_node_group</code>
* <code>[[fargate_profiles]]</code>
+
 
 +
<code>[[instance_type]]</code>
 +
 
 +
<code>[[instance_types]]</code>
 +
 
 +
<code>[[use_custom_launch_template]]</code>
 +
 
 +
<code>[[fargate_profiles]]</code>
 +
 
 +
<code>[[eks_managed_node_group_defaults]]</code>
  
 
== Examples ==
 
== Examples ==
Line 21: Line 28:
 
     [[instance_types]] = ["t3.small"]
 
     [[instance_types]] = ["t3.small"]
 
   
 
   
     [[min_size]]     = 1
+
     min_size    = 1
     [[max_size]]     = 3
+
     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
 
     [[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
 
   
 
   
Line 28: Line 35:
 
     echo 'foo bar'
 
     echo 'foo bar'
 
     EOT
 
     EOT
 
+
 
     vpc_security_group_ids = [
 
     vpc_security_group_ids = [
 
       aws_security_group.node_group_one.id
 
       aws_security_group.node_group_one.id
Line 55: Line 62:
  
  
 +
<pre>
 +
module "eks_managed_node_group" {
 +
  source = "terraform-aws-modules/eks/aws//modules/eks-managed-node-group"
  
module "eks_managed_node_group" {
 
  source = "terraform-aws-modules/eks/aws//modules/eks-managed-node-group"
 
 
 
   name            = "separate-eks-mng"
 
   name            = "separate-eks-mng"
 
   cluster_name    = "my-cluster"
 
   cluster_name    = "my-cluster"
 
   cluster_version = "1.24"
 
   cluster_version = "1.24"
+
 
 
   subnet_ids = ["subnet-abcde012", "subnet-bcde012a", "subnet-fghi345a"]
 
   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.
 
   // 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.
 
   // 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
 
   cluster_primary_security_group_id = module.eks.cluster_primary_security_group_id
 
   vpc_security_group_ids            = [module.eks.node_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
 
   // 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.
 
   // This module defaults to providing a custom launch template to allow for custom security groups, tag propagation, etc.
Line 80: Line 87:
 
   //    source_security_group_ids = [aws_security_group.remote_access.id]
 
   //    source_security_group_ids = [aws_security_group.remote_access.id]
 
   //  }
 
   //  }
+
 
 
   min_size    = 1
 
   min_size    = 1
 
   max_size    = 10
 
   max_size    = 10
 
   desired_size = 1
 
   desired_size = 1
+
 
 
   instance_types = ["t3.large"]
 
   instance_types = ["t3.large"]
 
   [[capacity_type]]  = "SPOT"
 
   [[capacity_type]]  = "SPOT"
+
 
 
   labels = {
 
   labels = {
 
     Environment = "test"
 
     Environment = "test"
Line 106: Line 113:
 
     Terraform  = "true"
 
     Terraform  = "true"
 
   }
 
   }
  }
+
}
 
+
</pre>
== Errors ==
 
│ 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 ==
 
== Related ==
Line 119: Line 120:
 
* 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
 
* 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
 
* <code>[[taints]]</code>
 
* <code>[[taints]]</code>
* Terraform resource: <code>[[aws_eks_node_group]]</code>
+
* <code>[[eks_managed_node_groups]]</code>
 
* <code>[[Terraform submodule]]</code>
 
* <code>[[Terraform submodule]]</code>
* <code>[[metadata options]]</code>
 
* <code>[[self_managed_node_groups]]</code>
 
* [[AWS EKS nodes]]
 
* [[module.eks.module.eks_managed_node_group]]
 
* [[Still destroying ...]]
 
  
 
== See also ==
 
== See also ==
* {{eks_managed_node_groups}}
 
* {{eks_managed_node_group}}
 
* {{module.eks}}
 
 
* {{Terraform EKS module}}
 
* {{Terraform EKS module}}
  
  
 
[[Category:EKS]]
 
[[Category:EKS]]

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Advertising: