61 lines
1.1 KiB
YAML
61 lines
1.1 KiB
YAML
---
|
|
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
|
|
namespace: pg
|
|
type: Opaque
|
|
data:
|
|
postgres-root-username: YWRtaW4=
|
|
postgres-root-password: YWRtaW5p
|
|
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: postgres-configmap
|
|
labels:
|
|
app: postgres
|
|
namespace: pg
|
|
data:
|
|
postgres-dbname: mainbase
|
|
---
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: pgadmin-secret
|
|
namespace: pg
|
|
type: Opaque
|
|
data:
|
|
pgadmin-default-password: YWRtb24=
|
|
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: pgadmin-config
|
|
namespace: pg
|
|
data:
|
|
servers.json: |
|
|
{
|
|
"Servers": {
|
|
"1": {
|
|
"Name": "pg-k8s",
|
|
"Group": "Servers",
|
|
"Port": 15432,
|
|
"Username": "admin",
|
|
"Host": "pg.guaranteedstruggle.host",
|
|
"SSLMode": "disable",
|
|
"MaintenanceDB": "mainbase"
|
|
}
|
|
}
|
|
} |