# PostgreSQL Deployment for Immich # Requires PostgreSQL 16+ with pgvector extension apiVersion: apps/v1 kind: Deployment metadata: name: immich-postgres namespace: services spec: replicas: 1 selector: matchLabels: app: immich-postgres template: metadata: labels: app: immich-postgres spec: containers: - name: postgres image: tensorchord/pgvecto-rs:pg16-v0.3.0 ports: - containerPort: 5432 env: - name: POSTGRES_DB value: immich - name: POSTGRES_USER value: immich - name: POSTGRES_PASSWORD valueFrom: secretKeyRef: name: immich-db-secret key: password volumeMounts: - name: postgres-data mountPath: /var/lib/postgresql/data volumes: - name: postgres-data persistentVolumeClaim: claimName: immich-postgres-pvc --- apiVersion: v1 kind: Service metadata: name: immich-postgres namespace: services spec: selector: app: immich-postgres ports: - protocol: TCP port: 5432 targetPort: 5432