Cloud Migration

Sovereign cloud migration with Polycrate CLI v0.71.0: EU Data Act, Kubernetes-native alternatives to hyperscaler services, and a five-phase migration path.

Proprietary cloud APIs, high egress fees, and vendor-specific IaC formats create long-term vendor lock-in with hyperscalers such as AWS, Azure, or Google Cloud. With Polycrate, Ansible, and Kubernetes, you transition workloads incrementally into an open, portable, and sovereign target architecture.

The EU Data Act as Legal Framework

Since September 12, 2025, the EU Data Act (Regulation (EU) 2023/2854) establishes binding rights for cloud switching and interoperability: open interfaces, machine-readable export formats, parallel operation during migration, and the phased elimination of switching and egress charges through 2028.

The Data Act provides the legal entitlement — Polycrate provides the technical tooling for repeatable, vendor-independent execution.

Why Polycrate for Cloud Migration?

  1. Ansible as an open standard: Automation across bare metal, EU cloud providers, VMware/Proxmox, and Kubernetes — agentless and declarative.
  2. Kubernetes as a portable target layer: Workloads run identically on your own servers, sovereign EU clouds, or managed clusters. Switching providers essentially only requires a new artifacts/secrets/kubeconfig.yml.
  3. Open OCI blocks: Reusable building blocks live in standard OCI registries and can be discovered directly via polycrate hub list and polycrate hub inspect.
  4. Reproducible container toolchain: The Debian-based Polycrate container includes Ansible, kubectl, helm, cilium, velero, age, psql, and skopeo. Any additional cloud provider CLIs or Python SDKs (such as boto3, awscli, azure-cli) can be added per project via a Dockerfile.poly.

Hyperscaler Services → Kubernetes-Native Polycrate Blocks

Hyperscaler Service Kubernetes-Native Alternative Example Block (via polycrate hub)
AWS RDS (PostgreSQL) CloudNativePG Operator ayedo/k8s/cloudnative-pg
AWS ElastiCache (Redis) Redis / Valkey HA ayedo/k8s/redis
AWS DocumentDB (MongoDB) MongoDB Replica Set ayedo/k8s/mongodb
AWS ALB / ELB NGINX Ingress / Envoy Gateway ayedo/k8s/nginx / ayedo/k8s/envoy-gateway
AWS Certificate Manager cert-manager + Let's Encrypt ayedo/k8s/cert-manager
AWS ECR Harbor Container Registry ayedo/k8s/harbor
AWS CloudWatch VictoriaMetrics + Grafana ayedo/k8s/victoria-metrics-stack
AWS Secrets Manager OpenBao ayedo/k8s/openbao
AWS SQS / SNS RabbitMQ Operator ayedo/k8s/rabbitmq-operator

Inspect current block versions and example configurations directly in the CLI:

polycrate hub list --kind k8sapp --no-pager
polycrate hub inspect ayedo/k8s/cloudnative-pg

The 5-Phase Migration Path

graph LR
    P1[1. Assessment] --> P2[2. Target Architecture]
    P2 --> P3[3. Parallel Build]
    P3 --> P4[4. Cutover & Testing]
    P4 --> P5[5. Decommission]

Phase 1: Assessment & Inventory

Catalog existing hyperscaler resources, database schemas, and dependencies in a dedicated assessment workspace. If you need cloud SDKs (such as boto3 for AWS), add them to the Dockerfile.poly of the assessment workspace:

# Dockerfile.poly
FROM cargo.ayedo.cloud/library/polycrate:0.71.0
RUN pip install --no-cache-dir boto3     && ansible-galaxy collection install amazon.aws

Phase 2: Define the Target Architecture

Map every proprietary service to an open Kubernetes-native block (see the mapping table above) and define backup, monitoring, and security requirements.

Phase 3: Build the Target Environment in Parallel

Create a dedicated migration workspace (e.g., acme-migration-1) with a central artifacts/secrets/kubeconfig.yml and an encrypted secrets.poly.age:

# workspace.poly
name: acme-migration-1
organization: acme

blocks:
  - name: ingress
    from: cargo.ayedo.cloud/ayedo/k8s/nginx:<version>

  - name: cert-manager
    from: cargo.ayedo.cloud/ayedo/k8s/cert-manager:<version>

  - name: monitoring
    from: cargo.ayedo.cloud/ayedo/k8s/victoria-metrics-stack:<version>

  - name: postgres
    from: cargo.ayedo.cloud/ayedo/k8s/cloudnative-pg:<version>
    config:
      namespace: databases

workflows:
  - name: setup-target-stack
    steps:
      - name: deploy-ingress
        block: ingress
        action: install
      - name: deploy-cert-manager
        block: cert-manager
        action: install
      - name: deploy-monitoring
        block: monitoring
        action: install
      - name: deploy-postgres
        block: postgres
        action: install
polycrate workflow run setup-target-stack --blocks-auto-pull

Phase 4: Data Migration, Cutover & Validation

For a PostgreSQL migration from RDS to CloudNativePG, write the export into {{ block.artifacts.path }} and access the target cluster using the automatically configured KUBECONFIG / K8S_AUTH_KUBECONFIG:

# blocks/pg-migration/backup-rds.yml
- name: Back up schema and data from RDS
  hosts: localhost
  gather_facts: false
  tasks:
    - name: Write pg_dump into block artifacts
      ansible.builtin.command:
        argv:
          - pg_dump
          - -h
          - "{{ block.config.rds.host }}"
          - -U
          - "{{ block.config.rds.user }}"
          - -d
          - "{{ block.config.rds.database }}"
          - -F
          - custom
          - -f
          - "{{ block.artifacts.path }}/rds-backup.dump"
      environment:
        PGPASSWORD: "{{ block.config.rds.password }}"
      no_log: true

After restoring into CloudNativePG, validate data integrity, latencies, and metrics in Grafana, switch DNS/traffic in a controlled cutover, and observe the system during a soak period.

Phase 5: Decommission Legacy Resources and Version Custom Blocks

Once the new environment has stabilized, decommission legacy hyperscaler resources in a controlled manner. Share custom migration or application blocks via your OCI registry:

# Push without :tag — version is taken from block.poly
polycrate block push registry.acme.corp/acme/k8s/my-app

Getting Started

# Install Polycrate CLI
curl -fsSL https://app.ayedo.cloud/api/v1/cli/public/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"

# Browse the catalog
polycrate hub list --kind k8sapp --no-pager

See Also