Skip to content

Kubernetes controller for observability of Amazon EC2 Spot Interruption events

Notifications You must be signed in to change notification settings

int128/spot-handler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spot-handler go

This is a Kubernetes controller to receive Amazon EC2 Spot Instance interruption notices and emit Kubernetes events.

Purpose

When a spot interruption occurs, it may break production service such as a network error. It is important to measure the number of affected nodes or pods. For now, Karpenter does not provide that metrics.

This controller provides the Kubernetes events of the following resources:

  • Node affected by a spot interruption.
  • Pod affected by a spot interruption.

You can set up your SLO based on the number of affected nodes or pods.

How it works

This controller receives a spot interruption from EventBridge via SQS.

graph LR
  EventBridge --> SQS --> Controller --> Event --> Datadog
  subgraph AWS
    EventBridge
    SQS
  end
  subgraph Kubernetes cluster
    Controller
    Event
  end
Loading