Created
December 9, 2022 04:38
-
-
Save initcron/4a39d7defe732b903fb6e60a223f8595 to your computer and use it in GitHub Desktop.
Pod Spec for PostgreSQL Database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: db | |
labels: | |
app: postgres | |
role: database | |
tier: back | |
spec: | |
containers: | |
- name: db | |
image: postgres:9.4 | |
env: | |
- name: POSTGRES_HOST_AUTH_METHOD | |
value: trust | |
ports: | |
- containerPort: 5432 | |
volumeMounts: | |
- name: db-data | |
mountPath: /var/lib/postgresql/data | |
volumes: | |
- name: db-data | |
hostPath: | |
path: /var/lib/pgdata | |
type: DirectoryOrCreate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment