feat: add Kubernetes manifests for Traefik ingress
This commit is contained in:
29
k8s/deployment.yaml
Normal file
29
k8s/deployment.yaml
Normal 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
18
k8s/ingress.yaml
Normal 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
11
k8s/service.yaml
Normal 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
|
||||
Reference in New Issue
Block a user