change some
This commit is contained in:
32
k8s/12-postgres-deployment.yaml
Normal file
32
k8s/12-postgres-deployment.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
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
|
||||
Reference in New Issue
Block a user