blumeops/plans/k8s-migration/P3_postgresql.md
Erich Blume a8f4d00294 K8s Migration Phase 1: Infrastructure Setup (#29)
## Summary
- Split k8s migration plan into phases folder for easier navigation
- Added `tag:k8s` to Pulumi ACLs for Kubernetes workloads
- Phase 1 work in progress

## Phase 1 Goals
- Tailscale Kubernetes Operator
- CloudNativePG Operator
- PostgreSQL cluster for future app migrations

## Deployment and Testing
- [ ] Review Phase 1 plan
- [ ] `mise run tailnet-preview` to verify ACL changes
- [ ] `mise run tailnet-up` to apply ACL changes
- [ ] Create Tailscale OAuth client (manual)
- [ ] Deploy operators and PostgreSQL cluster

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Reviewed-on: https://forge.tail8d86e.ts.net/eblume/blumeops/pulls/29
2026-01-19 09:49:52 -08:00

809 B

Phase 3: PostgreSQL Migration

Goal: Migrate miniflux database to CloudNativePG

Status: Pending

Prerequisites: Phase 2 complete


Steps

1. Create databases and users in k8s PostgreSQL

  • miniflux database/user
  • borgmatic read-only user

2. Export from brew PostgreSQL

pg_dump -h localhost -U miniflux miniflux > miniflux_backup.sql

3. Expose k8s PostgreSQL via Tailscale

  • Service with loadBalancerClass: tailscale
  • Tag: svc:pg-k8s

4. Import data

psql -h pg-k8s.tail8d86e.ts.net -U miniflux miniflux < miniflux_backup.sql

5. Update borgmatic config

  • Change hostname to k8s PostgreSQL

6. Verify data integrity


Rollback

Keep brew PostgreSQL running until Phase 4 verified