added k8s files and manifests files
Some checks failed
ecommerce frontend/pipeline/head Something is wrong with the build of this commit

This commit is contained in:
tusuii
2026-03-10 22:41:08 +05:30
parent c504876102
commit bb5dfe4e23
5 changed files with 175 additions and 6 deletions

40
k8s/deployment.yaml Normal file
View File

@@ -0,0 +1,40 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: website
namespace: ecommerce
spec:
replicas: 1
selector:
matchLabels:
app: website
template:
metadata:
labels:
app: website
spec:
containers:
- name: website
image: 192.168.49.2:30004/vaishnavi-ecommerce/website:latest
imagePullPolicy: Always
ports:
- containerPort: 5173
resources:
requests:
cpu: "100m"
memory: "128Mi"
limits:
cpu: "250m"
memory: "256Mi"
livenessProbe:
httpGet:
path: /
port: 5173
initialDelaySeconds: 15
periodSeconds: 15
readinessProbe:
httpGet:
path: /
port: 5173
initialDelaySeconds: 5
periodSeconds: 5

20
k8s/ingress.yaml Normal file
View File

@@ -0,0 +1,20 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: website-ingress
namespace: ecommerce
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: "10m"
spec:
ingressClassName: nginx
rules:
- host: website.local
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: website
port:
number: 5173

13
k8s/service.yaml Normal file
View File

@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: website
namespace: ecommerce
spec:
type: NodePort
selector:
app: website
ports:
- port: 5173
targetPort: 5173
nodePort: 30081