Is this possible to do through the API?
I would like to run a script on shutdown for spot instances to hit the API to deactivate, remove and purge the host but I can’t think of a good way to actually get the ID of the host that is going down.
I saw the meetup video and blog post for spotinst where they set the host label to the instance id here http://blog.spotinst.com/2015/11/26/rancher-spotinst-integration/ but don’t know how to use that info.
How would I accomplish this? Is it even possible right now?