kops icon indicating copy to clipboard operation
kops copied to clipboard

How to stop nodes being started

Open perrohunter opened this issue 9 years ago • 4 comments

I'm trying to "pause" my cluster by stopping all the ec2 nodes however after a few moments all nodes get started, I cannot figure out what is restarting them because I even stop the master.

How can I disable this behaviour so I can pause entire clusters?

perrohunter avatar Apr 06 '17 00:04 perrohunter

@perrohunter this is because nodes are created using autoscaling groups. The autoscaling groups are managed by kops. I have not tried setting the instancegroup node counts to zero via a kops edit instancegroup command, but it may be possible to do so. When i've had to stop nodes I've done it by manually setting the autoscaling group configuration to zero via the AWS console. This will terminate the nodes, it is not possible to pause them because the architecture relies on ASGs.

egalano avatar Apr 06 '17 19:04 egalano

Thanks for your prompt answer, that told me everything I needed to know!

What I ended up doing was changing the instance groups to 0 using kops edit as you suggested

for the nodes

kops edit ig nodes

and set maxSize and minSize to 0

for the master, I had to figure my master by doing

$ kops get ig
Using cluster from kubectl context: staging.cluster-name.com

NAME			ROLE	MACHINETYPE	MIN	MAX	SUBNETS
master-us-west-2a	Master	m3.medium	0	0	us-west-2a
nodes			Node	t2.medium	0	0	us-west-2a

then, with the name of my master

kops edit ig master-us-west-2a

and again set maxSize and minSize to 0

lastly, I had to update my cluster

kops update cluster --yes
kops rolling-update cluster

Awesome, cluster is offline now! no need to go into AWS

perrohunter avatar Apr 06 '17 20:04 perrohunter

We would LOVE if someone on this issue would document this :) Otherwise I am marking it that we need to document it.

chrislovecnm avatar Apr 23 '17 22:04 chrislovecnm

I did a small blog post that has been getting some traffic now (so this is a common question). I can create the documentation and push a PR if you'd like.

perrohunter avatar Apr 23 '17 22:04 perrohunter