Skip to content

Instantly share code, notes, and snippets.

@tarasowski
Created February 4, 2025 10:00
Show Gist options
  • Select an option

  • Save tarasowski/1997532f852fde4d15bbde07b9dd4d6c to your computer and use it in GitHub Desktop.

Select an option

Save tarasowski/1997532f852fde4d15bbde07b9dd4d6c to your computer and use it in GitHub Desktop.

Revisions

  1. tarasowski created this gist Feb 4, 2025.
    33 changes: 33 additions & 0 deletions deployment.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,33 @@
    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