Pull pause image
podman pull k8s.gcr.io/pause:3.5
apiVersion: v1
kind: ConfigMap
metadata:
name: config
data:
POSTGRES_PASSWORD: welcome123
POSTGRES_USER: link
POSTGRES_DB: hyrule
PGADMIN_DEFAULT_EMAIL: link@hyrule.com
PGADMIN_DEFAULT_PASSWORD: welcome123
PGADMIN_LISTEN_ADDRESS: 0.0.0.0
PGADMIN_LISTEN_PORT: 80
apiVersion: v1
kind: Pod
metadata:
labels:
app: pgsql
name: pgsql
spec:
containers:
- image: docker.io/postgres:15
name: postgresql
envFrom:
- configMapRef:
name: config
ports:
- containerPort: 5432 # postgresql Container Port
hostPort: 5432 # postgresql Host Port
name: postgresql
- image: docker.io/dpage/pgadmin4:7
name: pgadmin
envFrom:
- configMapRef:
name: config
ports:
- containerPort: 80 # pgadmin Container Port
hostPort: 8080 # pgadmin Host Port
name: pgadmin
restartPolicy: Never
$ podman ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
57354cd100dc k8s.gcr.io/pause:3.5 10 seconds ago Up 5 seconds ago 0.0.0.0:8080->80/tcp, 0.0.0.0:5432->5432/tcp 07d74ea4854e-infra
0926b0c783ec docker.io/library/postgres:15 postgres 7 seconds ago Up 4 seconds ago 0.0.0.0:8080->80/tcp, 0.0.0.0:5432->5432/tcp pgsql-postgresql
b03d76bdc311 docker.io/dpage/pgadmin4:7 4 seconds ago Up 4 seconds ago 0.0.0.0:8080->80/tcp, 0.0.0.0:5432->5432/tcp pgsql-pgadmin