-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Please reconsider deprecating google_container_node_pool -> initial_node_count #1160
Comments
@james-masson I'm not sure it would work in this scenario, but have you experimented with |
There's a bit of discussion around this in #844. Can you take a look at #844 (comment) and see if solution #2 would work for your use case? |
Apologies for not finding #844 - it is a similar use case. Unfortunately, the solution you mentioned wouldn't work for me. I want the This initial capacity boost and multiple nodepools is the only way I've found to make the upgrade process close to seamless. The reason I have blue/green nodepools is that the Google API for creating nodepools ( and hence terraform ) returns success too soon. It's quite normal for the API to return success, and to have zero nodes available to host services for quite a while afterwards. I've also seen problems where no nodes will ever be created successfully, due to bugs or misconfigs.
What I'm trying to say is that my need for large I presume you're waiting for "RUNNING" from https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1beta1/projects.locations.clusters.nodePools#status ? I wonder why the discrepency between the API state and what K8s sees... |
So you are saying something similar to how ASG's work on the AWS provider (https://www.terraform.io/docs/providers/aws/r/autoscaling_group.html#wait_for_elb_capacity) is what you are looking for here? The ability to wait for a certain number of healthy nodes before moving on to dependencies? |
Exactly. |
Signed-off-by: Modular Magician <magic-modules@google.com>
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks! |
Terraform Version
Terraform v0.11.3
google-provider 1.6.0
Affected Resource(s)
google_container_node_pool
Terraform Configuration Files
Problem
I'm trying to provide seamless nodepool upgrade/replacement with Terraform - always maintaining enough nodes to run all services on the cluster during the upgrade.
The cluster workload is highly elastic, and uses node autoscaling heavily.
I have blue/green nodepools, and
create_before_destroy
, and useinitial_node_count
to ensure that there's enough free capacity for this seamless migration.I cannot use
node_count
, as every subsequent terraform run will show my actual number of autoscaled nodes does not match my pre-configured amount - and offer to destroy the nodepool.Not specifying either
node_count
orinitial_node_count
results in zero nodes in the nodepool initially, which doesn't provide capacity to run all services during the upgrade process. Node autoscaling is too slow to catch-up to workload demands during the nodepool replacement cycle, to be useful during this replacement process.initial_node_count
provides this "on-creation" boost to the nodepool, to provide capacity for the seamless migration, before autoscaling drags the node numbers down to the required minimum.The text was updated successfully, but these errors were encountered: