{"id":574,"date":"2023-08-07T11:14:08","date_gmt":"2023-08-07T11:14:08","guid":{"rendered":"http:\/\/192.168.0.142\/?p=574"},"modified":"2023-08-07T13:37:08","modified_gmt":"2023-08-07T13:37:08","slug":"run-postgresql-and-pgadmin-pod-using-podman","status":"publish","type":"post","link":"http:\/\/192.168.0.142\/run-postgresql-and-pgadmin-pod-using-podman\/","title":{"rendered":"Run PostgreSQL and pgAdmin pod using podman"},"content":{"rendered":"\n
Pull pause image<\/strong><\/p>\n\n\n\n Pull pause image<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[60,25,59],"_links":{"self":[{"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/posts\/574"}],"collection":[{"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/comments?post=574"}],"version-history":[{"count":9,"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/posts\/574\/revisions"}],"predecessor-version":[{"id":586,"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/posts\/574\/revisions\/586"}],"wp:attachment":[{"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/media?parent=574"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/categories?post=574"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/192.168.0.142\/wp-json\/wp\/v2\/tags?post=574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}podman pull k8s.gcr.io\/pause:3.5<\/code><\/pre>\n\n\n\n
apiVersion: v1\nkind: ConfigMap\nmetadata:\n name: config\ndata:\n POSTGRES_PASSWORD: welcome123\n POSTGRES_USER: link\n POSTGRES_DB: hyrule\n PGADMIN_DEFAULT_EMAIL: link@hyrule.com\n PGADMIN_DEFAULT_PASSWORD: welcome123\n PGADMIN_LISTEN_ADDRESS: 0.0.0.0\n PGADMIN_LISTEN_PORT: 80<\/code><\/pre>\n\n\n\n
apiVersion: v1\nkind: Pod\nmetadata:\n labels:\n app: pgsql\n name: pgsql\nspec:\n containers:\n - image: docker.io\/postgres:15\n name: postgresql\n envFrom:\n - configMapRef:\n name: config\n ports:\n - containerPort: 5432 # postgresql Container Port\n hostPort: 5432 # postgresql Host Port\n name: postgresql\n - image: docker.io\/dpage\/pgadmin4:7\n name: pgadmin\n envFrom:\n - configMapRef:\n name: config\n ports:\n - containerPort: 80 # pgadmin Container Port\n hostPort: 8080 # pgadmin Host Port\n name: pgadmin\n restartPolicy: Never<\/code><\/pre>\n\n\n\n
$ podman ps\nCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\n57354cd100dc 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\n0926b0c783ec 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\nb03d76bdc311 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<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"