diff options
author | Santo Cariotti <santo@dcariotti.me> | 2024-09-06 16:09:25 +0200 |
---|---|---|
committer | Santo Cariotti <santo@dcariotti.me> | 2024-09-06 16:09:25 +0200 |
commit | ff68c8cd24baef66ebb038d237b8f501c84edde5 (patch) | |
tree | a719191dce466a03244a705337f58c8f83f6f926 /k8s/postgres-deployment.yaml | |
parent | c4ef50c1f566b86c8892fa344ade8d5ca66fb93b (diff) |
Add script and configuration for Kubernetes
Diffstat (limited to 'k8s/postgres-deployment.yaml')
-rw-r--r-- | k8s/postgres-deployment.yaml | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/k8s/postgres-deployment.yaml b/k8s/postgres-deployment.yaml new file mode 100644 index 0000000..fd9945f --- /dev/null +++ b/k8s/postgres-deployment.yaml @@ -0,0 +1,38 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: postgres-deployment +spec: + replicas: 1 + selector: + matchLabels: + app: postgres + template: + metadata: + labels: + app: postgres + spec: + containers: + - name: postgres + image: postgis/postgis:16-3.4 + env: + - name: POSTGRES_USER + value: "postgres" + - name: POSTGRES_PASSWORD + value: "password" + - name: POSTGRES_DB + value: "gis" + ports: + - containerPort: 5432 + volumeMounts: + - mountPath: /var/lib/postgresql/data + name: pgdata + - mountPath: /docker-entrypoint-initdb.d + name: schema + volumes: + - name: pgdata + persistentVolumeClaim: + claimName: pgdata-pvc + - name: schema + hostPath: + path: ${PGDATA} |