I think that's an equally valid approach. The Lambda solution likely gives more control over the termination timing since since it's plugged in as a lifecycle hook, but if that isn't needed, I think the daemonset would work fine.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I would assume (haven't studied it extensively though) that rebalancing would send the same termination signal as would removing a spot instance.
If so, the 'Spot Interrupt Handler DaemonSet' mentioned in ec2spotworkshops.com might be an interesting alternative.
Lambda (external) vs. daemonset (internal). I'm inclined to favor having the magic run from within the cluster, similar to cluster-autoscaler, etc.
Thoughts? (came here via the 3 nov article)
I think that's an equally valid approach. The Lambda solution likely gives more control over the termination timing since since it's plugged in as a lifecycle hook, but if that isn't needed, I think the daemonset would work fine.