add stage.d-b.ca application

This commit is contained in:
2025-05-11 12:23:52 -06:00
parent 1978ece02a
commit c57e6bd981
8 changed files with 129 additions and 0 deletions

View File

@ -0,0 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- web/deployment.yaml
- web/ingress.yaml
- web/service.yaml
- web/web-backend-tls.yaml

View File

@ -0,0 +1,35 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: web
labels:
app: web
spec:
selector:
matchLabels:
app: web
replicas: 2
template:
metadata:
labels:
app: web
spec:
containers:
- name: web
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
memory: 512Mi
ports:
- containerPort: 443
protocol: TCP
name: https
volumeMounts:
- mountPath: /tls
name: web-backend-tls
volumes:
- name: web-backend-tls
secret:
secretName: web-backend-tls

View File

@ -0,0 +1,11 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
acme.cert-manager.io/http01-ingress-class: nginx
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
name: web
labels:
app: web
spec:
ingressClassName: nginx

View File

@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: web
spec:
ports:
- name: https
port: 443
protocol: TCP
targetPort: 443
selector:
app: web
type: ClusterIP

View File

@ -0,0 +1,13 @@
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: web-backend-tls
spec:
secretName: web-backend-tls
duration: 2160h # 90d
renewBefore: 360h # 15d
dnsNames:
- web
issuerRef:
name: kubernetes-issuer
kind: ClusterIssuer