-
Notifications
You must be signed in to change notification settings - Fork 1
Description
qkube nuke <CLUSTER> [--resize SIZE]This command will get the cluster back to it's empty state by allocating a new cluster with the same IP address and DNS and releasing the old cluster. For all intents and purposes it appears that the same cluster has been cleaned up.
If you specify --size, the new allocated host will be from a different size type.
This is very useful for dev clusters when you just want to scratch everything and start over or if you need more or less resources and want to resize the cluster.
Implementation notes
- allocate a new host
- transfer the IP address from the old host to the new host
- release the hold host
The heavy-ish lift here is the IP address. Right now, we don't allocate an elastic IP address for our hosts, which means we can transfer them to the new host.
Did some initial research and what I believe we need is to add a lifecycle hook to the autoscaling group to allocate and associate an Elastic IP with every host. Then, nuke can move the IP between the old and new hosts.
It is important to release the EIP when the host is terminated (so we will likely need two lifecycle hooks).