The  aws-node-termination-handler (NTH) can operate in two different modes: Instance Metadata Service (IMDS) or the Queue Processor.

The aws-node-termination-handler Instance Metadata Service Monitor will run a small pod on each host to perform monitoring of IMDS paths like /spot or /events and react accordingly to drain and/or cordon the corresponding node.

The aws-node-termination-handler Queue Processor will monitor an SQS queue of events from Amazon EventBridge for ASG lifecycle events, EC2 status change events, and Spot Interruption Termination Notice events. When NTH detects an instance is going down, we use the Kubernetes API to cordon the node to ensure no new work is scheduled there, then drain it, removing any existing work. The termination handler Queue Processor requires AWS IAM permissions to monitor and manage the SQS queue and to query the EC2 API. The queue processor mode is currently in a beta preview.


Instance Metadata Service Processor

  • Monitors EC2 Metadata for Scheduled Maintenance Events
  • Monitors EC2 Metadata for Spot Instance Termination Notifications
  • Monitors EC2 Metadata for Rebalance Recommendation Notifications
  • Helm installation and event configuration support
  • Webhook feature to send shutdown or restart notification messages
  • Unit & Integration Tests

#kubernetes #node #node.js

AWS Node Termination Handler
3.10 GEEK