File tree Expand file tree Collapse file tree 7 files changed +150
-18
lines changed Expand file tree Collapse file tree 7 files changed +150
-18
lines changed Original file line number Diff line number Diff line change 1+ apiVersion : apps/v1
2+ kind : Deployment
3+ metadata :
4+ name : backend-deployment
5+ spec :
6+ replicas : 2 # minimum replicas for HPA
7+ selector :
8+ matchLabels :
9+ app : backend
10+ template :
11+ metadata :
12+ labels :
13+ app : backend
14+ spec :
15+ containers :
16+ - name : backend
17+ image : aayushxrj/gochat-backend:latest
18+ ports :
19+ - containerPort : 8080
20+ resources :
21+ requests :
22+ cpu : " 200m"
23+ memory : " 256Mi"
24+ limits :
25+ cpu : " 500m"
26+ memory : " 512Mi"
27+
28+ ---
29+ apiVersion : v1
30+ kind : Service
31+ metadata :
32+ name : backend-service
33+ spec :
34+ selector :
35+ app : backend
36+ ports :
37+ - protocol : TCP
38+ port : 8080
39+ targetPort : 8080
40+ type : ClusterIP
Original file line number Diff line number Diff line change 1+ apiVersion : autoscaling/v2
2+ kind : HorizontalPodAutoscaler
3+ metadata :
4+ name : backend-hpa
5+ spec :
6+ scaleTargetRef :
7+ apiVersion : apps/v1
8+ kind : Deployment
9+ name : backend-deployment
10+ minReplicas : 2
11+ maxReplicas : 5
12+ metrics :
13+ - type : Resource
14+ resource :
15+ name : cpu
16+ target :
17+ type : Utilization
18+ averageUtilization : 75
19+ - type : Resource
20+ resource :
21+ name : memory
22+ target :
23+ type : Utilization
24+ averageUtilization : 75
Original file line number Diff line number Diff line change 1+ apiVersion : autoscaling.k8s.io/v1
2+ kind : VerticalPodAutoscaler
3+ metadata :
4+ name : backend-vpa
5+ spec :
6+ targetRef :
7+ apiVersion : " apps/v1"
8+ kind : Deployment
9+ name : backend-deployment
10+ updatePolicy :
11+ updateMode : " Off" # Set to "Auto" for automatic updates(Overrides HPA limits), "Off" to disable updates
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ apiVersion : apps/v1
2+ kind : Deployment
3+ metadata :
4+ name : frontend-deployment
5+ spec :
6+ replicas : 2 # start with min 2
7+ selector :
8+ matchLabels :
9+ app : frontend
10+ template :
11+ metadata :
12+ labels :
13+ app : frontend
14+ spec :
15+ containers :
16+ - name : frontend
17+ image : aayushxrj/gochat-frontend:latest
18+ ports :
19+ - containerPort : 5173
20+ resources :
21+ requests :
22+ cpu : " 100m"
23+ memory : " 128Mi"
24+ limits :
25+ cpu : " 300m"
26+ memory : " 256Mi"
27+
28+ ---
29+ apiVersion : v1
30+ kind : Service
31+ metadata :
32+ name : frontend-service
33+ spec :
34+ selector :
35+ app : frontend
36+ ports :
37+ - protocol : TCP
38+ port : 5173
39+ targetPort : 5173
40+ type : NodePort
Original file line number Diff line number Diff line change 1+ apiVersion : autoscaling/v2
2+ kind : HorizontalPodAutoscaler
3+ metadata :
4+ name : frontend-hpa
5+ spec :
6+ scaleTargetRef :
7+ apiVersion : apps/v1
8+ kind : Deployment
9+ name : frontend-deployment
10+ minReplicas : 2
11+ maxReplicas : 4
12+ metrics :
13+ - type : Resource
14+ resource :
15+ name : cpu
16+ target :
17+ type : Utilization
18+ averageUtilization : 75
19+ - type : Resource
20+ resource :
21+ name : memory
22+ target :
23+ type : Utilization
24+ averageUtilization : 75
Original file line number Diff line number Diff line change 1+ apiVersion : autoscaling.k8s.io/v1
2+ kind : VerticalPodAutoscaler
3+ metadata :
4+ name : frontend-vpa
5+ spec :
6+ targetRef :
7+ apiVersion : " apps/v1"
8+ kind : Deployment
9+ name : frontend-deployment
10+ updatePolicy :
11+ updateMode : " Off" # Set to "Auto" for automatic updates(Overrides HPA limits), "Off" to disable updates
You can’t perform that action at this time.
0 commit comments