updated kubernetes file

This commit is contained in:
gulimabr
2026-01-13 15:12:10 -03:00
parent 541f08524b
commit 9f8315120b

View File

@@ -1,13 +1,13 @@
apiVersion: v1 apiVersion: v1
kind: Namespace kind: Namespace
metadata: metadata:
name: periodic-table name: requirements-periodic-table
--- ---
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: fastapi-app name: fastapi-app
namespace: periodic-table namespace: requirements-periodic-table
spec: spec:
replicas: 2 replicas: 2
selector: selector:
@@ -18,12 +18,17 @@ spec:
labels: labels:
app: fastapi-app app: fastapi-app
spec: spec:
imagePullSecrets:
- name: regcred
containers: containers:
- name: fastapi-app - name: fastapi-app
image: periodic-table-backend:latest # TODO: push to registry and set full image name image: docker.io/your-dockerhub-username/periodic-table-backend:latest
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
ports: ports:
- containerPort: 8080 - containerPort: 8080
env:
- name: DATABASE_HOST
value: postgresql
envFrom: envFrom:
- secretRef: - secretRef:
name: periodic-table-env # Provide secrets for APP settings name: periodic-table-env # Provide secrets for APP settings
@@ -32,7 +37,7 @@ apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: fastapi-app name: fastapi-app
namespace: periodic-table namespace: requirements-periodic-table
spec: spec:
selector: selector:
app: fastapi-app app: fastapi-app
@@ -46,7 +51,7 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: frontend name: frontend
namespace: periodic-table namespace: requirements-periodic-table
spec: spec:
replicas: 2 replicas: 2
selector: selector:
@@ -57,9 +62,11 @@ spec:
labels: labels:
app: frontend app: frontend
spec: spec:
imagePullSecrets:
- name: regcred
containers: containers:
- name: frontend - name: frontend
image: periodic-table-frontend:latest # TODO: push to registry and set full image name image: docker.io/your-dockerhub-username/periodic-table-frontend:latest
imagePullPolicy: IfNotPresent imagePullPolicy: IfNotPresent
ports: ports:
- containerPort: 80 - containerPort: 80
@@ -68,7 +75,7 @@ apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: frontend name: frontend
namespace: periodic-table namespace: requirements-periodic-table
spec: spec:
selector: selector:
app: frontend app: frontend