with kubernetes config files

This commit is contained in:
Mosiur
2026-05-03 07:59:17 +00:00
commit 3e5fb66bd6
45 changed files with 423 additions and 0 deletions

46
frontend/deployment.yaml Normal file
View File

@@ -0,0 +1,46 @@
# kubernetes/frontend/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend
namespace: todo-app
spec:
replicas: 2
selector:
matchLabels:
app: frontend
template:
metadata:
labels:
app: frontend
tier: web
spec:
containers:
- name: frontend
image: silvarno/todo-frontend:latest
ports:
- containerPort: 80
securityContext:
runAsNonRoot: false # nginx needs root to bind port 80
allowPrivilegeEscalation: false
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "200m"
---
apiVersion: v1
kind: Service
metadata:
name: frontend-service
namespace: todo-app
spec:
selector:
app: frontend
type: NodePort
ports:
- port: 80
targetPort: 80
nodePort: 31081