HorizontalPodAutoscaler uses request (not limit) to determine when to scale by percent

apiVersion: apps/v1
kind: Deployment
metadata:
name: helloworld-deployment
spec:
template:
spec:
containers:
- name: hello-world
image: helloworld-webserver:v1.0.0
resources:
requests:
cpu: 10m
memory: 32Mi
limits:
cpu: 100m
memory: 64Mi
...
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: helloworld-deployment
spec:
maxReplicas: 4
minReplicas: 1
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: helloworld-deployment
targetCPUUtilizationPercentage: 80

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Paul Dally

Paul Dally

266 Followers

Distinguished Architect at Sun Life Financial. Focused on containers & Kubernetes. Views & opinions expressed here are my own, not necessarily those of Sun Life