While playing with the excellent lops I had the need to shutdown the cluster while not in use, this proved hard as every time I stopped the machines, something would turn it back on, turns out it was the AWS autoscaling groups.
To fix this I didn’t wanted to mess with the kops settings on the AWS side so I had to find the kops way to do this.
What I ended up doing was changing the instance groups to 0 using kops edit
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.espresive.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.
If you wanted to turn your cluster back on, rever the settings, changing your master to at least 1, and your nodes to your liking, I use 2.
I never had any problem using `kops delete cluster`
I didn’t wanted to delete the whole cluster, just stop it, I want to keep all the other resources except the instances (DNS entries, volumes, ELBs, VPCs etc)
How to shutdown a kops Kubernetes cluster on AWS – [PERR0_HUNTER] | thechrisshort
I must say it was hard to find your page in search results.
You write awesome content but you should rank your blog higher in search
engines. If you don’t know 2017 seo techniues search on youtube:
how to rank a website Marcel’s way
good stuff.
cryptomining discovered on this blog
Norton Security prevented a cryptomining attack on this page
thanks for reporting this, I’m looking into the issue, I think my wordpress got compromised
hey I tried it and my master and nodes nothiing shutdown..
thank you, it workes
I have noticed you don’t monetize your site, don’t waste your traffic, you can earn additional bucks every
month. You can use the best adsense alternative for any type of website (they approve all websites),
for more details simply search in gooogle: boorfe’s tips monetize your website
perrohunter.com is fantastic, i will come back here for sure
It works, thanks brother.
Kops暂停群集应该使EC2实例群集处于停止状态 - 实战宝典