mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-01-15 08:14:12 +01:00
docs: Update UPGRADE-18.0.md (#2014)
This commit is contained in:
@@ -565,6 +565,163 @@ module "cluster_after" {
|
||||
}
|
||||
```
|
||||
|
||||
### Diff of before <> after
|
||||
|
||||
```diff
|
||||
module "eks" {
|
||||
source = "terraform-aws-modules/eks/aws"
|
||||
- version = "~> 17.0"
|
||||
+ version = "~> 18.0"
|
||||
|
||||
cluster_name = local.name
|
||||
cluster_version = local.cluster_version
|
||||
cluster_endpoint_private_access = true
|
||||
cluster_endpoint_public_access = true
|
||||
|
||||
vpc_id = module.vpc.vpc_id
|
||||
- subnets = module.vpc.private_subnets
|
||||
+ subnet_ids = module.vpc.private_subnets
|
||||
|
||||
- # Managed Node Groups
|
||||
- node_groups_defaults = {
|
||||
+ eks_managed_node_group_defaults = {
|
||||
ami_type = "AL2_x86_64"
|
||||
disk_size = 50
|
||||
}
|
||||
|
||||
- node_groups = {
|
||||
+ eks_managed_node_groups = {
|
||||
node_group = {
|
||||
- min_capacity = 1
|
||||
- max_capacity = 10
|
||||
- desired_capacity = 1
|
||||
+ min_size = 1
|
||||
+ max_size = 10
|
||||
+ desired_size = 1
|
||||
|
||||
instance_types = ["t3.large"]
|
||||
capacity_type = "SPOT"
|
||||
|
||||
update_config = {
|
||||
max_unavailable_percentage = 50
|
||||
}
|
||||
|
||||
- k8s_labels = {
|
||||
+ labels = {
|
||||
Environment = "test"
|
||||
GithubRepo = "terraform-aws-eks"
|
||||
GithubOrg = "terraform-aws-modules"
|
||||
}
|
||||
|
||||
taints = [
|
||||
{
|
||||
key = "dedicated"
|
||||
value = "gpuGroup"
|
||||
effect = "NO_SCHEDULE"
|
||||
}
|
||||
]
|
||||
|
||||
- additional_tags = {
|
||||
+ tags = {
|
||||
ExtraTag = "example"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- # Worker groups
|
||||
- worker_additional_security_group_ids = [aws_security_group.additional.id]
|
||||
-
|
||||
- worker_groups_launch_template = [
|
||||
- {
|
||||
- name = "worker-group"
|
||||
- override_instance_types = ["m5.large", "m5a.large", "m5d.large", "m5ad.large"]
|
||||
- spot_instance_pools = 4
|
||||
- asg_max_size = 5
|
||||
- asg_desired_capacity = 2
|
||||
- kubelet_extra_args = "--node-labels=node.kubernetes.io/lifecycle=spot"
|
||||
- public_ip = true
|
||||
- },
|
||||
- ]
|
||||
+ self_managed_node_group_defaults = {
|
||||
+ vpc_security_group_ids = [aws_security_group.additional.id]
|
||||
+ }
|
||||
+
|
||||
+ self_managed_node_groups = {
|
||||
+ worker_group = {
|
||||
+ name = "worker-group"
|
||||
+
|
||||
+ min_size = 1
|
||||
+ max_size = 5
|
||||
+ desired_size = 2
|
||||
+ instance_type = "m4.large"
|
||||
+
|
||||
+ bootstrap_extra_args = "--kubelet-extra-args '--node-labels=node.kubernetes.io/lifecycle=spot'"
|
||||
+
|
||||
+ block_device_mappings = {
|
||||
+ xvda = {
|
||||
+ device_name = "/dev/xvda"
|
||||
+ ebs = {
|
||||
+ delete_on_termination = true
|
||||
+ encrypted = false
|
||||
+ volume_size = 100
|
||||
+ volume_type = "gp2"
|
||||
+ }
|
||||
+
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ use_mixed_instances_policy = true
|
||||
+ mixed_instances_policy = {
|
||||
+ instances_distribution = {
|
||||
+ spot_instance_pools = 4
|
||||
+ }
|
||||
+
|
||||
+ override = [
|
||||
+ { instance_type = "m5.large" },
|
||||
+ { instance_type = "m5a.large" },
|
||||
+ { instance_type = "m5d.large" },
|
||||
+ { instance_type = "m5ad.large" },
|
||||
+ ]
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
|
||||
# Fargate
|
||||
fargate_profiles = {
|
||||
default = {
|
||||
name = "default"
|
||||
selectors = [
|
||||
{
|
||||
namespace = "kube-system"
|
||||
labels = {
|
||||
k8s-app = "kube-dns"
|
||||
}
|
||||
},
|
||||
{
|
||||
namespace = "default"
|
||||
}
|
||||
]
|
||||
|
||||
tags = {
|
||||
Owner = "test"
|
||||
}
|
||||
|
||||
timeouts = {
|
||||
create = "20m"
|
||||
delete = "20m"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tags = {
|
||||
Environment = "test"
|
||||
GithubRepo = "terraform-aws-eks"
|
||||
GithubOrg = "terraform-aws-modules"
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### Attaching an IAM role policy to a Fargate profile
|
||||
|
||||
#### Before 17.x
|
||||
|
||||
Reference in New Issue
Block a user