Horizontal Pod Autoscaler Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 5: Line 5:
A pre-requisite, if we intend the autoscaler to monitor resource metrics, a source of [[Metrics_in_Kubernetes#Resource_Metrics|resource metrics]] must be deployed. The simplest source of resource metrics is the [[Kubernetes Metrics Server|metrics server]].  
A pre-requisite, if we intend the autoscaler to monitor resource metrics, a source of [[Metrics_in_Kubernetes#Resource_Metrics|resource metrics]] must be deployed. The simplest source of resource metrics is the [[Kubernetes Metrics Server|metrics server]].  


The horizontal pod autoscalers works with a previously deployed higher level controller that supports scaling ([[Kubernetes_Deployments|deployments]], replica sets, stateful sets)
The horizontal pod autoscalers works with a previously deployed higher level controller that supports scaling ([[Kubernetes_Deployments|deployments]], replica sets, stateful sets).


==With CLI==
==With CLI==

Revision as of 19:45, 6 October 2020

Internal

Create an Autoscaler

A pre-requisite, if we intend the autoscaler to monitor resource metrics, a source of resource metrics must be deployed. The simplest source of resource metrics is the metrics server.

The horizontal pod autoscalers works with a previously deployed higher level controller that supports scaling (deployments, replica sets, stateful sets).

With CLI

kubectl autoscale deployment <deployment-name> --cpu-percent=50 --min=1 --max=10

With Metadata