Skip to content

Commit 4c7d2e6

Browse files
committed
Add Kubernetes for peerprep-fe
1 parent 3817fb6 commit 4c7d2e6

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

k8s/peerprep-fe.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: peerprep-fe
5+
labels:
6+
type: frontend
7+
app: peerprep-fe
8+
spec:
9+
selector:
10+
matchLabels:
11+
type: frontend
12+
app: peerprep-fe
13+
template:
14+
metadata:
15+
name: peerprep-fe
16+
labels:
17+
type: frontend
18+
app: peerprep-fe
19+
spec:
20+
containers:
21+
- name: peerprep-fe
22+
image: asia-southeast1-docker.pkg.dev/cs3219-g11-peerprep/cs3219-g11-repo/peerprep-fe:latest
23+
ports:
24+
- containerPort: 3000
25+
---
26+
apiVersion: v1
27+
kind: Service
28+
metadata:
29+
name: peerprep-fe
30+
spec:
31+
type: LoadBalancer
32+
ports:
33+
- port: 80
34+
targetPort: 3000
35+
selector:
36+
type: frontend
37+
app: peerprep-fe
38+
---
39+
apiVersion: autoscaling/v2
40+
kind: HorizontalPodAutoscaler
41+
metadata:
42+
name: peerprep-fe
43+
spec:
44+
scaleTargetRef:
45+
apiVersion: apps/v1
46+
kind: Deployment
47+
name: peerprep-fe
48+
minReplicas: 1
49+
maxReplicas: 5
50+
metrics:
51+
- type: Resource
52+
resource:
53+
name: cpu
54+
target:
55+
type: Utilization
56+
averageUtilization: 80

0 commit comments

Comments
 (0)