33 lines
685 B
YAML
33 lines
685 B
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: main-db
|
|
namespace: online-back
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app: main-db
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: main-db
|
|
spec:
|
|
containers:
|
|
- name: main-db
|
|
image: postgres:14.1-alpine
|
|
ports:
|
|
- containerPort: 5432
|
|
envFrom:
|
|
- secretRef:
|
|
name: main-db-secret
|
|
volumeMounts:
|
|
- name: db-storage
|
|
mountPath: /var/lib/postgresql/data
|
|
volumes:
|
|
- name: db-storage
|
|
persistentVolumeClaim:
|
|
claimName: main-db-pvc
|