-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpostgres-deployment.yaml
34 lines (34 loc) · 1.03 KB
/
postgres-deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
apiVersion: apps/v1
kind: Deployment
metadata:
name: postgres
namespace: namespace_name
spec:
replicas: 1
selector:
matchLabels:
app: postgres
template:
metadata:
labels:
app: postgres
spec:
containers:
- name: postgres
image: postgres:latest
env:
- name: POSTGRES_DB
value: "synapse"
- name: POSTGRES_USER
value: "postgres_user"
- name: POSTGRES_PASSWORD
value: "postgres_password"
ports:
- containerPort: 5432
volumeMounts:
- name: postgres-data
mountPath: /var/lib/postgresql/data
volumes:
- name: postgres-data
persistentVolumeClaim:
claimName: postgres-pv-claim