postgres and hello world server

This commit is contained in:
talksik
2023-07-28 14:29:16 -07:00
parent 87c01fbcfa
commit 0d894d164b
4 changed files with 91 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: postgres
spec:
replicas: 1
selector:
matchLabels:
app: postgres
template:
metadata:
labels:
app: postgres
spec:
containers:
- name: postgres
image: docker.io/library/postgres:14
imagePullPolicy: "IfNotPresent"
ports:
- containerPort: 5432
- hostPort: 5432
env:
- name: POSTGRES_USER
value: admin
- name: POSTGRES_PASSWORD
value: water
- name: POSTGRES_DB
value: defaultdb
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: postgredb
volumes:
- name: postgredb
persistentVolumeClaim:
claimName: postgres-pv-claim