feat: add Kubernetes manifests for Traefik ingress

This commit is contained in:
2026-03-11 15:00:56 +01:00
parent 9c4bce0473
commit 78aaf56149
3 changed files with 58 additions and 0 deletions

29
k8s/deployment.yaml Normal file
View File

@@ -0,0 +1,29 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: cmsn-b-linh
labels:
app: cmsn-b-linh
spec:
replicas: 1
selector:
matchLabels:
app: cmsn-b-linh
template:
metadata:
labels:
app: cmsn-b-linh
spec:
containers:
- name: nginx
image: cmsn-b-linh:latest # Change to your registry
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
resources:
requests:
cpu: "50m"
memory: "64Mi"
limits:
cpu: "100m"
memory: "128Mi"

18
k8s/ingress.yaml Normal file
View File

@@ -0,0 +1,18 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: cmsn-b-linh
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: web
spec:
rules:
- host: cmsn-b-linh.duylai.duckdns.org
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: cmsn-b-linh
port:
number: 80

11
k8s/service.yaml Normal file
View File

@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: cmsn-b-linh
spec:
selector:
app: cmsn-b-linh
ports:
- port: 80
targetPort: 80
type: ClusterIP