Production files created

This commit is contained in:
Henrik Corneliussen
2026-05-07 01:05:55 +02:00
parent 4a4f6bf2bc
commit e5e5555730
3 changed files with 43 additions and 0 deletions

26
k8s/prod/deployment.yaml Normal file
View File

@@ -0,0 +1,26 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: flask-app
namespace: production
spec:
replicas: 2
selector:
matchLabels:
app: flask-app
template:
metadata:
labels:
app: flask-app
spec:
containers:
- name: flask-app
image: registry.gitlab.com/YOUR-GROUP/YOUR-PROJECT:latest
imagePullPolicy: Always
ports:
- containerPort: 5000
env:
- name: FLASK_ENV
value: production
- name: DATABASE_URL
value: postgresql://postgres:password@postgres-service:5432/appdb

4
k8s/prod/namespace.yaml Normal file
View File

@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: production

13
k8s/prod/service.yaml Normal file
View File

@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: flask-service
namespace: production
spec:
selector:
app: flask-app
ports:
- protocol: TCP
port: 80
targetPort: 5000
type: ClusterIP