Horizontal Pod Autoscaling
Planted .
It is implemented as a API resource and controller. It is a control loop that runs intermittently (default 15sec). Once during each run, the controller checks resource utilisation against the metrics specified in definition, then calculates utilisation after target state is reached, then scales it as needed.
Sample definition file
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: php-apache-hpa
namespace: default
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: php-apache
minReplicas: 1
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 50 Paths into this note
1 note leads here
-
Similar to HPA, it monitors resources, and increases resources on the pod if required. It is not inbuilt, it needs to be downloaded and applied.