New to Kestra?
Use blueprints to kickstart your first workflows.
Apply a shared Kubernetes manifest across many tenant clusters with Kestra, resolving per-cluster credentials and verifying every rollout.
Standardize configuration across a fleet of Kubernetes clusters from one declarative workflow. This blueprint takes a single shared manifest and applies it to many tenant clusters at once, resolving each cluster's API endpoint and credentials dynamically from secrets, then reading the resource back so you have proof the rollout landed everywhere. It solves the multi-cluster drift problem: instead of running kubectl apply by hand against each kubeconfig context or wiring a fragile shell loop, you get a repeatable, auditable, parallel rollout with built-in verification.
apply_across_clusters task (io.kestra.plugin.core.flow.ForEach) iterates over the clusters input array, with concurrencyLimit: 3 so at most three clusters are updated in parallel.apply_manifest (io.kestra.plugin.kubernetes.kubectl.Apply) resolves masterUrl and oauthToken from per-cluster secrets using {{ secret('K8S_MASTER_URL_' ~ taskrun.value) }} and {{ secret('K8S_TOKEN_' ~ taskrun.value) }}, then server-side applies the inline manifest into the target_namespace.verify_apply (io.kestra.plugin.kubernetes.kubectl.Get) reads the configmaps resource named platform-baseline back from the same cluster with fetchType: FETCH, confirming the object exists post-apply.rollout_on_schedule trigger (io.kestra.plugin.core.trigger.Schedule) can roll the baseline out every Monday at 08:00 via cron: "0 8 * * 1". It ships disabled: true, so enable it when you are ready.outputs.apply_across_clusters for downstream checks or auditing.kubectl across kubeconfig contexts by hand.kubectl is a single-cluster CLI with no scheduler, no retry semantics, and no audit trail. Kestra wraps it in declarative YAML, fans out across clusters with ForEach, resolves credentials securely per cluster, captures verification output, and gives you event or schedule triggers, automatic retries, and full execution lineage that the tool's own command line cannot provide.
For every cluster name <name> you pass in the clusters input:
K8S_MASTER_URL_<name>: API server URL for that cluster.K8S_TOKEN_<name>: bearer token for that cluster.K8S_MASTER_URL_<name> and K8S_TOKEN_<name> secrets for each cluster.clusters input and set target_namespace.outputs.apply_across_clusters to confirm every cluster.io.kestra.plugin.kubernetes.kubectl.Delete step to prune retired resources.