apiVersion: apps/v1
kind: Deployment
metadata:
  name: curio-db
  namespace: curio
spec:
  selector:
    matchLabels:
      app: curio-db
  template:
    metadata:
      labels:
        app: curio-db
    spec:
      containers:
      - name: postgres
        image: postgres:15-alpine
        env:
        - name: POSTGRES_PASSWORD
          value: "curio_secret"
        - name: POSTGRES_DB
          value: "curio"
        ports:
        - containerPort: 5432
---
apiVersion: v1
kind: Service
metadata:
  name: curio-db
  namespace: curio
spec:
  selector:
    app: curio-db
  ports:
  - port: 5432
