admin pannel k8s

This commit is contained in:
tusuii
2026-02-19 18:53:04 +05:30
parent 94d0aabec6
commit ba2831d491
7 changed files with 174 additions and 2 deletions

60
k8s/deployment.yaml Normal file
View File

@@ -0,0 +1,60 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ecommerce-admin-panel
namespace: ecommerce
labels:
app: ecommerce-admin-panel
spec:
replicas: 2
selector:
matchLabels:
app: ecommerce-admin-panel
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
template:
metadata:
labels:
app: ecommerce-admin-panel
spec:
containers:
- name: ecommerce-admin-panel
# Replace with your actual registry image
# Build with: docker build --build-arg VITE_API_URL=https://api.yourdomain.com .
image: your-registry/ecommerce-admin-panel:latest
imagePullPolicy: Always
ports:
- containerPort: 80
protocol: TCP
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "200m"
livenessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 10
periodSeconds: 30
failureThreshold: 3
readinessProbe:
httpGet:
path: /
port: 80
initialDelaySeconds: 5
periodSeconds: 10
failureThreshold: 3
# Spread pods across nodes for high availability
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: ecommerce-admin-panel