How to enable auto scaling in kubernetes

How to enable auto scaling in kubernetes

Horizontal Pod Autoscaler

Autoscaling at pod level this includes the Horizontal Pod Autoscaler (HPA). It scales the pods in a deployment or replica set. It is implemented as a K8s API resource and a controller. The controller manager queries the resource utilization against the metrics specified in each HorizontalPodAutoscaler definition. It obtains the metrics from either the resource metrics API (for per-pod resource metrics), or the custom metrics API (for all other metrics).

Cluster Autoscaler

Autoscaling at the Cluster level, The Cluster Autoscaler (CA) manages scalability by scaling the number of nodes inside your Cluster.

Cluster Autoscaler is a tool that automatically adjusts the size of the Kubernetes cluster when one of the following conditions is true:

there are pods that failed to run in the cluster due to insufficient resources,

there are nodes in the cluster that have been underutilized for an extended period of time and their pods can be placed on other existing nodes.

The cluster autoscaler on AWS scales worker nodes within any specified autoscaling group. It will run as a Deployment in your cluster.


Comments