Sign inSign up

marcincuber/k8s-spot-handler

By marcincuber

•Updated almost 7 years ago

Kubernetes spot handler

Image
0

50K+

marcincuber/k8s-spot-handler repository overview

⁠k8s-spot-handler

Github Source: https://github.com/marcincuber/k8s-spot-handler⁠

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.

⁠Installation

⁠Kubernetes templates
kubectl apply -f sample-deploy-k8s/*

⁠Available docker images/tags

Tags denotes Kubernetes/kubectl versions. Using the same version for your Kubernetes cluster and k8s-spot-handler is recommended. Note that the -1 (or similar) is the revision of this tool, in case we need versioning.

  • marcincuber/k8s-spot-handler:1.13.7-1
  • marcincuber/k8s-spot-handler:1.14.3-1
  • marcincuber/k8s-spot-handler:1.15.0-1

⁠Why use it

  • So that your kubernetes jobs backed by spot instances can keep running on another 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, according to my study⁠).

Run kubectl logs against the handler pod to watch how it works.

Tag summary

Content type

Image

Digest

Size

17 MB

Last updated

almost 7 years ago

docker pull marcincuber/k8s-spot-handler:v1.16.2-1