Skip to content

Multi-cluster / multi-cloud architecture

How to run Karakuri across many clusters spanning AWS (EKS), GCP (GKE), and Azure (AKS) — including private clusters.

Decision: one agent per cluster (in-cluster)

Karakuri runs inside each cluster, using that cluster's ServiceAccount. This is the recommended model for multi-cloud / private clusters.

 EKS ─┐  Karakuri pod (in-cluster SA)               Slack workspace
 GKE ─┤  watches its own cluster, applies fixes  →  #eks-prod-alerts
 AKS ─┘                                              #gke-stg-alerts
                                                     #aks-prod-alerts
 GitOps (ArgoCD/Flux ApplicationSet) deploys the chart to every cluster

Why (vs a central hub watching remote clusters)

Agent per cluster (recommended) Central hub
Private endpoints (EKS/GKE/AKS) ✅ internal kubernetes.default.svc ❌ needs VPN/peering/PrivateLink
Auth ✅ in-cluster SA — uniform across clouds ❌ per-cloud exec plugins (aws, gke-gcloud-auth-plugin, kubelogin) baked in + creds
Blast radius ✅ one cluster's failure is isolated ❌ single point of failure for all
Cross-network ✅ none required ❌ connectivity to every cluster
Deploys N (GitOps templates it) 1

The central-hub model is only appropriate for clusters you can already reach (e.g. local k3s / lab), which is what the clusters: {...} multi-cluster config and merged KUBECONFIG support. For multi-cloud private prod, use agent-per-cluster.

Auth: k8s API vs cloud API

  • k8s API (what Karakuri needs for kubectl): the in-cluster ServiceAccount token works identically on EKS, GKE, and AKS. No IRSA / Workload Identity / Managed Identity required.
  • Cloud API (only if a cluster needs e.g. ECR pulls): that's where IRSA (EKS) / Workload Identity (GKE) / Managed Identity (AKS) come in — orthogonal to Karakuri's k8s access.

In-cluster, the agent auto-generates a kubeconfig from the SA (server: https://kubernetes.default.svc, projected token, CA), context in-cluster, so both the watch client and kubectl work with no mounted kubeconfig. Set each deployment's config.clusters.<name>.context: in-cluster.

RBAC

The chart's ClusterRole grants the SA the reads + the write verbs Karakuri applies (scale / rollout / set resources / patch / delete pod) plus the resource reads the native analyzers need (services, endpoints, pvc, ingress, nodes, hpa). Tighten per cluster by overriding the ClusterRole if a cluster should be read-only.

Secrets

Per-cluster Secret with Slack tokens + the LLM provider key. Manage centrally with the External Secrets Operator pulling from one Vault / AWS Secrets Manager / GCP Secret Manager / Azure Key Vault, so you don't hand-copy secrets to N clusters.

Slack

One Slack app, installed once. Each cluster's deployment sets its own notify_channel (e.g. #eks-prod-alerts). All cards land in one workspace — that's your single pane of glass across clouds.

GitOps deployment

An ArgoCD ApplicationSet (cluster generator) renders the Karakuri Helm chart for every registered cluster, with per-cluster values (cluster name, notify channel, secret ref). Adding a cluster = registering it with Argo; the agent rolls out automatically.

# sketch — ApplicationSet cluster generator
spec:
  generators: [{ clusters: {} }]          # all Argo-registered clusters
  template:
    spec:
      source:
        chart: karakuri
        helm:
          values: |
            config:
              clusters:
                {{name}}: { context: in-cluster, notify_channel: "#{{name}}-alerts", auto_watch: true }
            existingSecret: karakuri-secrets   # via External Secrets
      destination: { server: "{{server}}", namespace: karakuri }

Single-instance note

Each in-cluster agent is a single active replica (it keeps watcher/alert state in memory). With one agent per cluster that's exactly right — there's no cross-cluster state to share. See HA design for active/active within a single cluster (not needed for the per-cluster model).