Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
235 views
in Technique[技术] by (71.8m points)

kubernetes - Is there a way to protect the master node from autoscalling?

I am initializing a kubernetes cluster with Terraform, I created an aws_autoscaling_group for autoscaling, but I want to protect the master node from autoscaling. I haven't found a setting in the official documentation that could solve my problem.

Thank you for your help.

question from:https://stackoverflow.com/questions/65870342/is-there-a-way-to-protect-the-master-node-from-autoscalling

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

In your Terraform aws_autoscaling_group just set min_size, max_size and desired_capacity all to the same value. If you have 3 master nodes set all of them to 3. This will effectively disable autoscaling, but will always keep you cluster with 3 master nodes.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...