Skip to content

Commit 7d8ac08

Browse files
committed
postgres-pod
1 parent d7b3a80 commit 7d8ac08

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

Readme.md

+2
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ large data on disk, we disable persistence.
109109
In order for services to be exposed externally, an OpenShift route allows you to associate a service with an
110110
externally-reachable host name. This edge host name is then used to route traffic to the service.
111111

112+
## lost and found mount postgres
113+
## docker container ip
112114
## oc vs kubectl
113115

114116
## If the container doesn't have anything to do?? busybox-sleep

alpine/PersistentVolumeClaim.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: v1
2+
kind: PersistentVolumeClaim
3+
metadata:
4+
name: postgres-volume
5+
spec:
6+
# storageClassName: manual
7+
accessModes:
8+
- ReadWriteOnce
9+
resources:
10+
requests:
11+
storage: 1Gi

alpine/Pod-postgres-cli.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: postgres-client
5+
spec:
6+
containers:
7+
- name: postgres-client
8+
image: postgres
9+
env:
10+
- name: POSTGRES_PASSWORD
11+
value: parham
12+
- name: PGDATA
13+
value: /var/lib/postgresql/data/parham/
14+
volumeMounts:
15+
- name: postgres-volume
16+
mountPath: /var/lib/postgresql/data
17+
resources:
18+
limits:
19+
cpu: 100m
20+
memory: 512Mi
21+
requests:
22+
cpu: 100m
23+
memory: 512Mi
24+
volumes:
25+
- name: postgres-volume
26+
emptyDir: {}

0 commit comments

Comments
 (0)