File tree Expand file tree Collapse file tree 5 files changed +77
-0
lines changed Expand file tree Collapse file tree 5 files changed +77
-0
lines changed Original file line number Diff line number Diff line change
1
+ apiVersion : apps/v1
2
+ kind : Deployment
3
+ metadata :
4
+ name : worker
5
+ spec :
6
+ replicas : 1
7
+ selector :
8
+ matchLabels :
9
+ app : worker
10
+ template :
11
+ metadata :
12
+ labels :
13
+ app : worker
14
+ spec :
15
+ containers :
16
+ - name : worker
17
+ image : scaling_kubernetes_hpa_vpa/worker:latest
18
+ env :
19
+ - name : REDIS_HOST
20
+ value : " redis"
Original file line number Diff line number Diff line change
1
+ apiVersion : autoscaling/v2
2
+ kind : HorizontalPodAutoscaler
3
+ metadata :
4
+ name : worker-hpa
5
+ spec :
6
+ scaleTargetRef :
7
+ apiVersion : apps/v1
8
+ kind : Deployment
9
+ name : worker
10
+ minReplicas : 1
11
+ maxReplicas : 5
12
+ metrics :
13
+ - type : Resource
14
+ resource :
15
+ name : cpu
16
+ target :
17
+ type : Utilization
18
+ averageUtilization : 70
Original file line number Diff line number Diff line change
1
+ apiVersion : apps/v1
2
+ kind : Deployment
3
+ metadata :
4
+ name : redis
5
+ spec :
6
+ replicas : 1
7
+ selector :
8
+ matchLabels :
9
+ app : redis
10
+ template :
11
+ metadata :
12
+ labels :
13
+ app : redis
14
+ spec :
15
+ containers :
16
+ - name : redis
17
+ image : redis:6.2
18
+ ports :
19
+ - containerPort : 6379
Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ kind : Service
3
+ metadata :
4
+ name : redis
5
+ spec :
6
+ ports :
7
+ - port : 6379
8
+ selector :
9
+ app : redis
Original file line number Diff line number Diff line change
1
+ apiVersion : autoscaling.k8s.io/v1
2
+ kind : VerticalPodAutoscaler
3
+ metadata :
4
+ name : worker-vpa
5
+ spec :
6
+ targetRef :
7
+ apiVersion : " apps/v1"
8
+ kind : Deployment
9
+ name : worker
10
+ updatePolicy :
11
+ updateMode : " Auto"
You can’t perform that action at this time.
0 commit comments