ClusterAutoscaler

command module
v0.0.0-...-cb9ab9a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2021 License: MIT Imports: 5 Imported by: 0

README

ClusterAutoscaler

Implementation of Kubernetes Cluster Autoscaler in Golang

Command to execute the project


go run main.go -path=pass_kubeConfig_file_path -promIP=Prometheus-Server_IP_with_port

What is Cluster Autoscaler?

The cluster autoscaler is a Kubernetes tool that increases or decreases the size of a Kubernetes cluster (by adding or removing nodes), based on the presence of pending pods and node utilization metrics.

When Cluster Autoscaler scales up?

Cluster Autoscaler scales up when it sees pending pods which are unscheduled as the resources requested by them can't be allocated because of lack of resources OR there are no amount of resource left of a particular type such as Memory, CPU time, Process IDs, etc. so it scales up the number of nodes and the pending pods gets scheduled on the newly created nodes with the help of scheduler.

When Cluster Autoscaler scales down?

When the cluster autoscaler sees that certain nodes are underutilized (i.e resources such as CPU, Memory is being utilized lesser than the specified minimum threshold for them), the CA does the pre-removal checks on them. These pre-removal checks involve making sure that the node that has being selected to be removed does not contain pods which have their local storage attached or the pods have PDB (Pod Disruption Budget) defined for them, etc. If the selected nodess pass these pre-removal checks then they are taken down.

Architecture Diagram

1. k8s Cluster Architecture

image

2. Upscaling Decision Making Process

image

3. Downscaling Decision Making Process

image

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL