Skip to content

Implementation of Kubernetes Cluster Autoscaler in Golang including the metrics collection and decision making algorithm.

License

Notifications You must be signed in to change notification settings

ayush5588/ClusterAutoscaler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Implementation of Kubernetes Cluster Autoscaler in Golang including the metrics collection and decision making algorithm.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages