k8s/manifests/01-namespaces/pg.yaml

61 lines
1.1 KiB
YAML
Raw Normal View History

2023-12-14 19:27:10 +10:00
---
apiVersion: v1
kind: Namespace
metadata:
labels:
name: pg
name: pg
---
#### https://blog.devgenius.io/how-to-deploy-postgresql-db-server-and-pgadmin-in-kubernetes-a-how-to-guide-57952b4e29a8
# echo -n '<secret>' | base64
apiVersion: v1
kind: Secret
metadata:
name: postgres-secret
labels:
app: postgres
2023-12-14 19:46:11 +10:00
namespace: pg
2023-12-14 19:27:10 +10:00
type: Opaque
data:
postgres-root-username: YWRtaW4=
postgres-root-password: YWRtaW5p
---
apiVersion: v1
kind: ConfigMap
metadata:
name: postgres-configmap
labels:
app: postgres
2023-12-14 19:46:11 +10:00
namespace: pg
2023-12-14 19:27:10 +10:00
data:
2023-12-14 20:20:16 +10:00
postgres-dbname: mainbase
---
apiVersion: v1
kind: Secret
metadata:
name: pgadmin-secret
namespace: pg
type: Opaque
data:
2023-12-14 20:50:06 +10:00
pgadmin-default-password: YWRtb24=
---
apiVersion: v1
kind: ConfigMap
metadata:
2023-12-14 20:54:12 +10:00
name: pgadmin-config
2023-12-14 20:50:06 +10:00
namespace: pg
data:
servers.json: |
2023-12-14 20:59:16 +10:00
{
"Servers": {
"1": {
"Name": "pg-k8s",
"Group": "Servers",
"Port": 15432,
"Username": "admin",
"Host": "pg.guaranteedstruggle.host",
2023-12-14 21:11:30 +10:00
"SSLMode": "disable",
2023-12-14 20:59:16 +10:00
"MaintenanceDB": "mainbase"
}
}
}