Skip to content

Instantly share code, notes, and snippets.

@tarasowski
Created February 4, 2025 10:00
Show Gist options
  • Save tarasowski/1997532f852fde4d15bbde07b9dd4d6c to your computer and use it in GitHub Desktop.
Save tarasowski/1997532f852fde4d15bbde07b9dd4d6c to your computer and use it in GitHub Desktop.
postgres-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: postgres-deployment
spec:
replicas: 1
selector:
matchLabels:
component: postgres
template:
metadata:
labels:
component: postgres
spec:
volumes:
- name: postgres-storage
persistentVolumeClaim:
claimName: database-persistent-volume-claim
containers:
- name: postgres
image: fhsinchy/notes-postgres
ports:
- containerPort: 5432
volumeMounts:
- name: postgres-storage
mountPath: /var/lib/postgresql/data
subPath: postgres
env:
- name: POSTGRES_PASSWORD
value: 63eaQB9wtLqmNBpg
- name: POSTGRES_DB
value: notesdb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment