Skip to content

Deploy postgres-operator v0.3.0-alpha.19 to keiailab EKS cluster #195

Description

@eightynine01

Context

postgres-operator v0.3.0-alpha.19 has been validated on a local kind cluster with successful e2e results. This issue tracks deployment to the actual keiailab EKS cluster (force-msa-dev) to begin the CNPG replacement process.

Pre-deployment Checklist

GitHub repo: https://github.com/keiailab/postgres-operator (source of truth)

Recent PRs merged (v0.3.0-alpha.19):

Kind cluster e2e results (2026-05-25):

Deployment Steps

1. Build and push container image

# On a machine with Docker + ghcr.io push access
docker build -t ghcr.io/keiailab/postgres-operator:0.3.0-alpha.19 .
docker push ghcr.io/keiailab/postgres-operator:0.3.0-alpha.19

2. Deploy operator via Helm

# Switch to EKS context
kubectl config use-context arn:aws:eks:us-east-1:650557269383:cluster/force-msa-dev

# Create namespace
kubectl create namespace postgres-operator

# Install via Helm (from GitHub repo checkout)
helm upgrade --install postgres-operator charts/postgres-operator \
  --namespace postgres-operator \
  --set image.tag=0.3.0-alpha.19 \
  --wait --timeout 120s

3. Verify operator

kubectl get pods -n postgres-operator
kubectl logs -n postgres-operator deployment/postgres-operator-controller-manager --tail=20
# Should see: "Starting workers" for all 6 controllers, no RBAC errors

4. Create test PostgresCluster

cat <<EOF | kubectl apply -f -
apiVersion: postgres.keiailab.io/v1alpha1
kind: PostgresCluster
metadata:
  name: e2e-test
  namespace: default
spec:
  postgresVersion: "17"
  shardingMode: none
  shards:
    initialCount: 1
    replicas: 0
    storage:
      size: 10Gi
EOF

5. Verify PostgreSQL

# Wait for Ready phase
kubectl get postgrescluster e2e-test -w

# Connect and verify
kubectl exec e2e-test-shard-0-0 -- psql -U postgres -tAc "SELECT version();"

6. Begin CNPG comparison

# Check current CNPG clusters
kubectl get clusters.postgresql.cnpg.io --all-namespaces

# Plan migration: create equivalent PostgresCluster CRs
# for each CNPG Cluster, test side-by-side

Gap Analysis Reference

See docs/gap-analysis/GAP-ANALYSIS.md in the repo for full CNPG comparison.

Remaining P0 gaps before CNPG replacement:

Already implemented:

Post-deployment

After successful EKS deployment:

  1. Run the full smoke test: bash hack/smoke.sh (adapted for EKS)
  2. Create a ScheduledBackup CR to test backup scheduling
  3. Create a Pooler CR to test PgBouncer integration
  4. Monitor operator metrics via Prometheus
  5. Begin Sprint S4 (PITR) implementation

Notes

  • AWS access: Container image must be pushed from a CI/CD pipeline or authorized workstation (not from development machines)
  • CNPG coexistence: postgres-operator uses postgres.keiailab.io API group — no conflict with CNPG's postgresql.cnpg.io
  • Rollback: helm uninstall postgres-operator -n postgres-operator removes all operator resources; CRDs persist for safety

GitLab 이관 · 원본 keiailab/upstream/postgres-operator#1 · 작성 @phil · 2026-05-25 · 라벨: deployment, operator, priority::high · 이관 2026-06-03

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions