Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update existing labels and taints of existing worker groups #1085

Closed
2 of 4 tasks
PeteMac88 opened this issue Nov 4, 2020 · 3 comments
Closed
2 of 4 tasks

Update existing labels and taints of existing worker groups #1085

PeteMac88 opened this issue Nov 4, 2020 · 3 comments

Comments

@PeteMac88
Copy link

PeteMac88 commented Nov 4, 2020

I have issues

Hey there,
i have an issue to update existing nodes with node labels and taints. The labels and taints are added to a node when add new worker group to our cluster but not if I am editing the kubelet_extra_args values of existing worker groups. Is this not possible or is this a bug?

Here is the snippet of our terraform code:

module "eks" {
  source          = "terraform-aws-modules/eks/aws"
  cluster_name    = var.cluster_name
  subnets         = module.vpc.private_subnets
  cluster_version = var.cluster_version
  vpc_id          = module.vpc.vpc_id
  worker_groups = [
    for wg in var.worker_groups : {
      name                          = wg.name
      instance_type                 = wg.instance_type
      asg_desired_capacity          = wg.desired_capacity
      asg_min_size                  = wg.min_capacity
      asg_max_size                  = wg.max_capacity
      additional_security_group_ids = [aws_security_group.security_groups[wg.security_group_prefix].id]
      kubelet_extra_args            = wg.kubelet_extra_args
      tags = [
        {
          key                 = "k8s.io/cluster-autoscaler/enabled"
          propagate_at_launch = "false"
          value               = "true"
        },
        {
          key                 = "k8s.io/cluster-autoscaler/${var.cluster_name}"
          propagate_at_launch = "false"
          value               = "true"
        }
      ]
    }
  ]
  write_kubeconfig = var.eks_write_kubeconfig
  map_users        = var.map_users
  enable_irsa      = true
}

Help appreciated. Best regards

Peter

I'm submitting a...

  • bug report
  • feature request
  • support request - read the FAQ first!
  • kudos, thank you, warm fuzzy

What is the current behavior?

If this is a bug, how to reproduce? Please include a code sample if relevant.

What's the expected behavior?

Are you able to fix this problem and submit a PR? Link here if you have already.

Environment details

  • Affected module version: latest
  • OS:
  • Terraform version: v0.13.4

Any other relevant info

We are using terraform cloud to keep our cluster state in sync and at best i want to changes to variable values directly applied to our cluster.

@barryib
Copy link
Member

barryib commented Nov 4, 2020

kubelet_extra_args is used by the bootstrap script which is run by cloudinit when your node start. To apply that you have different options:

  • Do it manually on each worker node (I don't know if it doable in your case even if it easy)
  • Do blue/green update with this module
  • Drain and delete worker node one by one and let the ASG or Cluster Autoscaller spawn a new node

See https:/terraform-aws-modules/terraform-aws-eks/blob/master/docs/faq.md#how-do-i-safely-remove-old-worker-groups and https:/terraform-aws-modules/terraform-aws-eks/blob/master/docs/faq.md#why-are-nodes-not-recreated-when-the-launch_configurationlaunch_template-is-recreated for more info.

@barryib
Copy link
Member

barryib commented Nov 11, 2020

Closing this. Feel free to re-open it the provided answer doesn't help you.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants