added kubernetes and removed keycloak from prod compose

This commit is contained in:
gulimabr
2026-01-12 09:21:15 -03:00
parent 592da7a2b6
commit 541f08524b
5 changed files with 497 additions and 40 deletions

79
k8s/prod.yaml Normal file
View File

@@ -0,0 +1,79 @@
apiVersion: v1
kind: Namespace
metadata:
name: periodic-table
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: fastapi-app
namespace: periodic-table
spec:
replicas: 2
selector:
matchLabels:
app: fastapi-app
template:
metadata:
labels:
app: fastapi-app
spec:
containers:
- name: fastapi-app
image: periodic-table-backend:latest # TODO: push to registry and set full image name
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
envFrom:
- secretRef:
name: periodic-table-env # Provide secrets for APP settings
---
apiVersion: v1
kind: Service
metadata:
name: fastapi-app
namespace: periodic-table
spec:
selector:
app: fastapi-app
ports:
- port: 8080
targetPort: 8080
name: http
type: ClusterIP
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend
namespace: periodic-table
spec:
replicas: 2
selector:
matchLabels:
app: frontend
template:
metadata:
labels:
app: frontend
spec:
containers:
- name: frontend
image: periodic-table-frontend:latest # TODO: push to registry and set full image name
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: frontend
namespace: periodic-table
spec:
selector:
app: frontend
ports:
- port: 80
targetPort: 80
name: http
type: LoadBalancer