-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathguestbook-hpa.yaml
More file actions
38 lines (38 loc) · 815 Bytes
/
guestbook-hpa.yaml
File metadata and controls
38 lines (38 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Prereq: Ensure to set resources cpu limits and HPA object is in same namespace as deployment
kind: HorizontalPodAutoscaler
apiVersion: autoscaling/v2beta2
metadata:
name: voting-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: voting-app-2-0
minReplicas: 1
maxReplicas: 5
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 20
---
kind: HorizontalPodAutoscaler
apiVersion: autoscaling/v2beta2
metadata:
name: voting-analytics-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: voting-analytics-2-0
minReplicas: 1
maxReplicas: 5
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 50