All Projects → VirtusLab → kubedrainer

VirtusLab / kubedrainer

Licence: Apache-2.0 license
Simple Kubernetes Node Drainer

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to kubedrainer

Istio Hpa
Configure horizontal pod autoscaling with Istio metrics and Prometheus
Stars: ✭ 81 (+326.32%)
Mutual labels:  autoscaling
Autospotting
Saves up to 90% of AWS EC2 costs by automating the use of spot instances on existing AutoScaling groups. Installs in minutes using CloudFormation or Terraform. Convenient to deploy at scale using StackSets. Uses tagging to avoid launch configuration changes. Automated spot termination handling. Reliable fallback to on-demand instances.
Stars: ✭ 2,014 (+10500%)
Mutual labels:  autoscaling
Magento-2-aws-cluster-terraform
Magento 2 AWS autoscaling cluster with Terraform and Packer or ImageBuilder. Adobe Commerce Cloud alternative. The best ecommerce infrastructure. Drive more sales online. Transparent billing. Developer-friendly. No hidden bottlenecks.
Stars: ✭ 107 (+463.16%)
Mutual labels:  autoscaling
Ecs Formation
Tool to build Docker cluster composition for Amazon EC2 Container Service(ECS)
Stars: ✭ 114 (+500%)
Mutual labels:  autoscaling
Custom Pod Autoscaler
Custom Pod Autoscaler base, allows creation of Custom Pod Autoscalers
Stars: ✭ 148 (+678.95%)
Mutual labels:  autoscaling
Terraform Aws Autoscaling
Terraform module which creates Auto Scaling resources on AWS
Stars: ✭ 166 (+773.68%)
Mutual labels:  autoscaling
Waiter
Runs, manages, and autoscales web services on Mesos and Kubernetes
Stars: ✭ 65 (+242.11%)
Mutual labels:  autoscaling
nomad-droplets-autoscaler
DigitalOcean Droplets target plugin for HashiCorp Nomad Autoscaler
Stars: ✭ 42 (+121.05%)
Mutual labels:  autoscaling
Aws Sdk Perl
A community AWS SDK for Perl Programmers
Stars: ✭ 153 (+705.26%)
Mutual labels:  autoscaling
Spring Boot K8s Hpa
Autoscaling Spring Boot with the Horizontal Pod Autoscaler and custom metrics on Kubernetes
Stars: ✭ 250 (+1215.79%)
Mutual labels:  autoscaling
Predictive Horizontal Pod Autoscaler
Horizontal Pod Autoscaler built with predictive abilities using statistical models
Stars: ✭ 132 (+594.74%)
Mutual labels:  autoscaling
Ladder
A general purpose extensible autoscaler for the cloud
Stars: ✭ 143 (+652.63%)
Mutual labels:  autoscaling
Replicator
Automated Cluster and Job Scaling For HashiCorp Nomad
Stars: ✭ 166 (+773.68%)
Mutual labels:  autoscaling
Kube Aws Autoscaler
Simple, elastic Kubernetes cluster autoscaler for AWS Auto Scaling Groups
Stars: ✭ 94 (+394.74%)
Mutual labels:  autoscaling
libra
A Nomad auto scaler
Stars: ✭ 72 (+278.95%)
Mutual labels:  autoscaling
Aws Auto Scaling Custom Resource
Libraries, samples, and tools to help AWS customers onboard with custom resource auto scaling.
Stars: ✭ 78 (+310.53%)
Mutual labels:  autoscaling
Sherpa
Sherpa is a highly available, fast, and flexible horizontal job scaling for HashiCorp Nomad. It is capable of running in a number of different modes to suit different requirements, and can scale based on Nomad resource metrics or external sources.
Stars: ✭ 165 (+768.42%)
Mutual labels:  autoscaling
hirefire-resource
Utility library for Ruby applications to simplify integration with HireFire.
Stars: ✭ 34 (+78.95%)
Mutual labels:  autoscaling
ecs-ansible-packer-terraform-wordpress
Proof of concept: Install wordpress environment using ansible, packer, docker, terraform and AWS.
Stars: ✭ 29 (+52.63%)
Mutual labels:  autoscaling
Aws Ec2 Assign Elastic Ip
Automatically assign Elastic IPs to AWS EC2 Auto Scaling Group instances
Stars: ✭ 172 (+805.26%)
Mutual labels:  autoscaling

kubedrainer

Build Status Binary Container Go Report Card

Kubernetes Node Drainer helps to evict pods from nodes before shutdown.

It is a single statically compiled binary in a minimal container (FROM scratch) run as non-root user.

How it works

A small binary run as a DaemonSet and listenning for a trigger (e.g. AWS ASG Lifecycle Hook). When triggered it uses Kubernetes Eviction API to drain the node (just like the kubectl drain command).

Supported Triggers

The code is prepared for multiple trigger providers if there is a community interest in such functionality, but currently supported triggers are:

Usage

The kubedrainer needs to run on every Kubernetes node.

AWS

Only 3 steps required:

  1. Add a ASG lifecycle hook
  2. Provide access to AWS API
  3. Deploy the deamonset

Lifecycle Hook

You need to configure your Auto Scaling Group (ASG) to wait for singal, before shutting down an instance. Without the lifecycle hook, the ASG wont wait for the kubedrainer to evict the pods.

CloudFormation fragment that shows the lifecycle hook config:

  NodeGroup:
    Type: AWS::AutoScaling::AutoScalingGroup
    ...

  NodeGroupLifecycleHook: # for node drainer
    Type: AWS::AutoScaling::LifecycleHook
    Properties:
      AutoScalingGroupName:
        Ref: NodeGroup
      LifecycleTransition: "autoscaling:EC2_INSTANCE_TERMINATING"
      HeartbeatTimeout: 360

IAM Role

The kubedrainer require access to a small portion of AWS API:

  • autoscaling:CompleteLifecycleAction
  • autoscaling:DescribeAutoScalingGroups
  • autoscaling:DescribeAutoScalingInstances
  • autoscaling:DescribeLifecycleHooks

See an example IAM Role in the examples/iam.yaml

Deployment as a Daemonset

The kubedrainer needs to run on every Kubernetes node.

See an example DaemonSet with RBAC examples/kubernetes/yaml

Contribution

Feel free to create a GitHub Issue for any questions, bug reports or feature requests, also Pull Requests are welcome, just make sure you discuss any major changes before investing a lot of time.

Releasing

Install Makefile dependencies:

make init

Verify the code:

make verify

Bump the version:

make bump-version

Tag the release:

make tag

The name

We believe in obvious names. It drains kubernetes nodes. It's kubedrainer.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].