K8S Cluster Autoscaler

KubernetesKubernetes
Kubernetes is a container orchestration platform. This note serves as a Map of Content for this topic. Start your exploration on one of these notes:

K8S NodeK8S Node
In [[Kubernetes]], a Node is a (physical or virtual) machine in charge of running some workloads. Kubernetes is run entirely on nodes, and everything that happens on Kubernetes cluster, happens on ...

[[K8S Object]]
[[What happen...
Cluster Autoscaler represents one of the types of Kubernetes AutoscalingKubernetes Autoscaling
There are 3 types of autoscaling available in [[Kubernetes]]:

[[K8S Cluster Autoscaler]]
Horizontal Pod Autoscaler
Vertical Pod Autoscaler




Status: #🌱

.

Its job is to add or remove K8S NodeK8S Node
In [[Kubernetes]], a Node is a (physical or virtual) machine in charge of running some workloads. Kubernetes is run entirely on nodes, and everything that happens on Kubernetes cluster, happens on ...
based on cluster usage. It works by checking for K8S PodK8S Pod
Pod is a [[K8S Object]] used to run one or more tightly coupled containers and is rarely used directly, especially in production because of the limitations on the number of properties that can be u...
s that are Pending K8S SchedulingK8S Scheduling
[[K8S Scheduler]] is making sure that every [[K8S Pod]] is assigned to a [[K8S Node]]. Every pod that gets created has a property NodeName which is not set by default. kube-scheduler looks for pods...
, and creates new Nodes if this is due to insufficient cluster capacity. It also tries to pack existing pods onto fewer nodes in an effort to destroy nodes which can be destroyed.

By default, Cluster Autoscaler checks for pending pods every 10 seconds, but this is configurable via --scan-interval flag.

It's worth noting that Cluster Autoscaler doesn't take CPU and memory utilization when making its decisions, but only 01 Inbox/K8S Resource Requests and Limits. Because of this, it has no idea how much of requested resources is actually used, which could lead to scaling up an already overprovisioned cluster if we are not paying attention.


Status: #💡

References: