- 8. Sep
Kube Spot Termination Notice Handler
This chart installs the kube-spot-termination-notice-handler as a daemonset across the cluster nodes. A Kubernetes DaemonSet to run 1 container per node to periodically polls the EC2 Spot Instance Termination Notices endpoint. Once a termination notice is received, it will try to gracefully stop all the pods running on the Kubernetes node, up to 2 minutes before the EC2 Spot Instance backing the node is terminated.
- The handler watches for Spot termination events, and will do the following if detected:
- Drain the affected node
- [Optional] Send a message to a Slack channel informing that a termination notice has been received.
- your kubernetes jobs backed by spot instances can keep running on other instances (typically on-demand instances)
How it works
Each spot-termination-notice-handler pod polls the notice endpoint until it returns a HTTP status 200. That status means a termination is scheduled for the EC2 spot instance running the handler pod.
Introduced in version 0.9.2 of this application (the @mumoshu version), you are able to setup a Slack incoming web hook in order to send slack notifications to a channel, notifying the users that an instance has been terminated.
Incoming WebHooks require that you set the SLACK_URL environmental variable as part of your PodSpec.