postgresql-pod.yaml
1.2 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
apiVersion: v1
kind: Service
metadata:
name: postgresql-server-
ownerReferences:
- apiVersion: v1
kind: Pod
blockOwnerDeletion: true
controller: true
name: PARENT_POD_NAME
uid: PARENT_POD_UID
spec:
type: ClusterIP
selector:
owner-uid: PARENT_POD_UID
ports:
- name: pgsql
protocol: TCP
port: 5432
targetPort: 5432
---
apiVersion: v1
kind: Pod
metadata:
name: postgresql-server-
labels:
owner-uid: PARENT_POD_UID
ownerReferences:
- apiVersion: v1
kind: Pod
blockOwnerDeletion: true
controller: true
name: PARENT_POD_NAME
uid: PARENT_POD_UID
spec:
volumes:
- name: postgresql-data
emptyDir: {}
- name: postgresql-confd
configMap:
name: task-postgresql-confd
containers:
- name: postgresql
image: bitnami/postgresql:14.1.0-debian-10-r66
#securityContext:
# runAsUser: 1001
# runAsGroup: 1001
env:
- name: POSTGRESQL_PASSWORD
value: CHANGEME
volumeMounts:
- name: postgresql-data
mountPath: /bitnami/postgresql
- name: postgresql-confd
mountPath: /opt/bitnami/postgresql/conf/conf.d
---