added kubernetes and removed keycloak from prod compose
This commit is contained in:
79
k8s/prod.yaml
Normal file
79
k8s/prod.yaml
Normal 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
|
||||
Reference in New Issue
Block a user