Add K8s deployment files, restructure to backend/frontend

This commit is contained in:
Agent
2026-03-20 05:12:22 +00:00
parent cea86e48a7
commit f70ba958c7
8 changed files with 371 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: todo-frontend
labels:
app: todo-frontend
spec:
replicas: 2
selector:
matchLabels:
app: todo-frontend
template:
metadata:
labels:
app: todo-frontend
spec:
containers:
- name: todo-frontend
image: todo-frontend:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
env:
- name: API_BASE_URL
valueFrom:
configMapKeyRef:
name: todo-config
key: API_BASE_URL
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "200m"
livenessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 10
periodSeconds: 10
readinessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 5
periodSeconds: 5