Polykube: Portable Backend Workloads Across Independent Kubernetes Clusters via GitOpsArticle · digest for October 16
Isometric architectural cutaway of independent Kubernetes clusters synchronized via the Polykube GitOps operator
Article3 sections≈ 3 min

Polykube: Portable Backend Workloads Across Independent Kubernetes Clusters via GitOps

Sooner or later, any growing engineering team runs into the need for multi-cluster deployments. The reasons vary: regulatory rules requiring user data to stay in a specific jurisdiction, disaster recovery against a full cloud provider outage, or simply cutting costs by moving heavy background workers onto cheap bare-metal servers.

The moment you set up classic federation (like KubeFed or heavy centralized control platforms), you introduce a single point of failure. Imagine the management cluster crashing or cross-region latency spiking into seconds. Syncing halts, and state drift threatens pod desynchronization and split-brain errors.

In Connecting multi-cloud Kubernetes clusters with Cilium Cluster Mesh, we looked at bridging cluster network planes at the eBPF layer. Engineers at Kismet Engineering have now taken that same philosophy to workload orchestration with their open-source GitOps operator, Polykube.

Decentralization Instead of an All-Powerful Control Cluster

Polykube's core architectural idea is dropping the centralized control plane altogether.

Every cluster in your infrastructure—whether AWS EKS in Frankfurt, Google GKE, or an on-prem data center—stays fully sovereign and self-contained. Each cluster runs a lightweight local Polykube agent.

Instead of waiting for orders from a central master, local operators independently read manifests from a shared Git repository and reconcile desired state. If the network link between clusters drops, each cluster keeps serving client traffic without degradation.

Declarative Distribution via WorkloadPlacement CRDs

Microservice developers no longer need to duplicate dozens of deployment.yaml files for each region. Distribution is defined in a single declarative resource:

apiVersion: polykube.kismet.io/v1alpha1
kind: WorkloadPlacement
metadata:
  name: billing-api
  namespace: production
spec:
  # Pod balancing strategy across providers
  distribution:
    strategy: MultiCloudWeighted
    targets:
      - clusterRef: aws-eu-central-1
        replicas: 6
        weight: 60
      - clusterRef: gcp-europe-west3
        replicas: 4
        weight: 40
  template:
    spec:
      containers:
        - name: api
          image: registry.example.com/billing:v3.2.0
          ports:
            - containerPort: 8080
          resources:
            requests:
              cpu: 300m
              memory: 512Mi

The local operator on each cluster matches its own ID against the targets list, extracts the pod template, and automatically creates a local Deployment with the assigned replica count.

Syncing via ArgoCD ApplicationSet

In production, delivering these manifests is automated using a standard GitOps tool—the ArgoCD ApplicationSet generator:

apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
  name: polykube-workloads
  namespace: argocd
spec:
  generators:
    - clusters: {}
  template:
    metadata:
      name: '{{name}}-workloads'
    spec:
      project: default
      source:
        repoURL: https://git.example.com/infrastructure/gitops.git
        targetRevision: HEAD
        path: workloads/production
      destination:
        server: '{{server}}'
        namespace: production
      syncPolicy:
        automated:
          prune: true
          selfHeal: true
Scope Limits: Stateless vs. Stateful

Keep the architectural boundaries clear: Polykube is built for moving stateless workloads (HTTP APIs, gRPC microservices, queue workers). Stateful databases like PostgreSQL, Redis, or Kafka still require database-level replication (Patroni, CockroachDB), because live-migrating Persistent Volumes across different cloud providers is physically impossible.

Want a deep diveVotes help us choose what to break down in detail. This material has 0 votes.
Sources · 2