43 lines
907 B
YAML
43 lines
907 B
YAML
---
|
|
apiVersion: v1
|
|
|
|
kind: Pod
|
|
|
|
metadata:
|
|
name: db_stack_pod
|
|
labels:
|
|
app: db_stack
|
|
|
|
spec:
|
|
containers:
|
|
- name: postgres-db
|
|
image: docker.io/library/postgres:latest
|
|
ports:
|
|
- containerPort: 5432
|
|
envFrom:
|
|
- configMapRef:
|
|
name: postgres-config
|
|
volumeMounts:
|
|
- name: postgres-storage
|
|
mountPath: /var/lib/postgresql
|
|
- name: pgadmin-web
|
|
image: docker.io/dpage/pgadmin4:latest
|
|
ports:
|
|
- containerPort: 80
|
|
hostPort: 8081
|
|
envFrom:
|
|
- configMapRef:
|
|
name: postgres-config
|
|
volumeMounts:
|
|
- name: pgadmin-data
|
|
mountPath: /var/lib/pgadmin
|
|
volumes:
|
|
- name: postgres-storage
|
|
hostPath:
|
|
path: ./pgdata/data
|
|
type: DirectoryOrCreate
|
|
- name: pgadmin-data
|
|
hostPath:
|
|
path: ./pgdata/pgadmin
|
|
type: DirectoryOrCreate
|