This commit is contained in:
2026-02-14 03:58:31 +00:00
parent dfbc5d402f
commit 3c21d6c8e5
4 changed files with 148 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: todo-frontend-config
data:
BACKEND_URL: "http://<BACKEND_NODE_IP>:30001" # Update with your NodePort IP or LoadBalancer DNS
---
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: IMAGE_PATH_PLACEHOLDER
ports:
- containerPort: 3000
env:
- name: PORT
value: "3000"
- name: BACKEND_URL
valueFrom:
configMapKeyRef:
name: todo-frontend-config
key: BACKEND_URL
---
apiVersion: v1
kind: Service
metadata:
name: todo-frontend-service
spec:
type: NodePort
selector:
app: todo-frontend
ports:
- protocol: TCP
port: 3000
targetPort: 3000
nodePort: 30000