The cluster is gone. A cloud account was suspended, a region went dark, or someone destroyed the wrong environment. You create a new cluster, install Argo CD, point it at the repository, and within minutes every Application is green. The product is still down: logins fail, the API serves an empty database, the payment provider rejects calls from an address it has never seen, and the certificate controller is waiting on a rate limit.
None of that is an Argo CD failure. Argo CD did exactly what GitOps promises: it put the desired state back. Desired state is half of a working cluster. The other half never lived in the repository, and that half decides how long you are down.
GitOps is now the norm for mature teams. The CNCF Annual Cloud Native Survey found that 58% of cloud native innovators use GitOps principles extensively. With it comes a quiet assumption that the repository is the recovery plan. We have rebuilt a client cluster from Git end to end, and it went quickly. This article is the list we would give anyone before they try: what Git brings back, what it cannot, the order to restore the rest, and how to find out your real recovery time before an incident does it for you.
What Git gives back in minutes
Every manifest, every version
On our clusters everything is installed through Argo CD, so the repository is the complete inventory of what runs there. We made the same point in our guide to auditing unmaintained components: if every component arrives through GitOps, the list already exists. For recovery that is the good news. Workloads, Services, ingress routes, network policies, operators, their custom resources, Helm values: all of it comes back from one source, with history attached.
History matters more during a rebuild than people expect. You want the state that was running when the cluster died, not whatever was merged to main ten minutes later. Pin the root Application to a known commit or tag for the rebuild, bring the cluster up on it, and only then let it follow the branch again.
The flip side is that the repository restores only what it holds. Anything changed by hand on the old cluster, a patched ConfigMap, a resource limit someone raised during an incident, is gone after the rebuild, silently. On our clusters nothing is installed or changed outside Argo CD, and that rule pays for itself on exactly this day. If yours has exceptions, they belong on the list in the next section.
One script, then one Application
Argo CD cannot install itself into a cluster where it does not exist yet, so a rebuild starts with one imperative step. In our setups a bootstrap script does three things: it installs Argo CD, installs the sealed-secrets controller and loads that cluster's sealing key, and then creates the root Application. From that point the cluster starts restoring itself from Git.
The root Application follows the app of apps pattern: one Argo CD Application whose only content is other Applications. Everything after it is manifests that Argo CD applies, which keeps the rebuild identical to a normal deploy. The script stays short on purpose. Its job ends where Argo CD can take over.
We do not try to bring back Argo CD's own state from the dead cluster. Its sync history and UI state describe a cluster that no longer exists, and nothing in a rebuild depends on them. What the new cluster needs is the repository, and a clean install reads it.
What never lived in Git
Here is where recovery time actually goes. Each item below has its own backup, its own owner and its own restore step, and Argo CD can only finish the rebuild once they are in place.

What a GitOps repository restores, and the state outside it that decides recovery time
Database contents
Git holds the shape of your databases, never their rows. With CloudNativePG the rows live in object storage as base backups plus continuously archived WAL. We covered how that works in why we run CNPG for Postgres, so here only the part that bites during a rebuild.
Recovery in CNPG is never in place. It always creates a new Cluster that bootstraps from the backup and replays WAL up to a target you choose, such as targetTime or targetLSN. The trap is that bootstrap is read only when a Cluster is created. The manifest that runs your database day to day almost certainly says initdb. Sync it into a fresh cluster and you get a brand new, empty database. Schema migrations run against it and succeed, pods turn Ready, Argo CD reports Healthy, and the product serves nobody's data.

The same Cluster manifest creates an empty database or a restored one, depending on its bootstrap section
So the repository needs a recovery variant of every database manifest, written and reviewed while nothing is on fire: a bootstrap.recovery section pointing at the backup, and a new serverName or path for the restored Cluster's own backups, because CNPG refuses to write into a location that already holds data from the old one. During a rebuild the preparation commit, the first step of the recovery order below, switches to that variant before any database is turned on. Your recovery point is whatever WAL reached the bucket before the cluster died.
In practice the variant is a few lines. With the Barman Cloud plugin, a restored Cluster reads from the old backup location as an external cluster and archives its own WAL under a new name:
How you switch between the two is a matter of taste: a Helm value, a Kustomize overlay, a separate path the root Application can point at. What matters is that the switch is one reviewed commit. Nobody should be typing YAML from memory at three in the morning. Add a recoveryTarget with targetTime only when you need to stop before a known bad moment, such as a destructive migration; for a lost cluster you usually want everything the archive has.
The sealing key
Secrets in our repositories are SealedSecrets: ciphertext that only one cluster's private key can open. We use Sealed Secrets with a key per cluster, and the backup of each key sits in the client's managed vault. Without that key, every SealedSecret in Git is unreadable and nothing that needs a credential starts.
This is the reason the key is part of the bootstrap script rather than something Argo CD syncs later. The key goes into the cluster together with the controller, and every SealedSecret Argo CD applies afterwards decrypts on the first try. The sealed-secrets README says the same in plainer terms: restore the keys before the controller starts, or replace the key it generated and restart it. One more line from the same README is worth a calendar entry: after the scheduled key renewal you should recreate the backup, or it stops covering secrets sealed since.
Cloud identities
Pods reach cloud services through identities that live in the cloud account, not in the cluster. On EKS with IAM roles for service accounts, each cluster gets its own OIDC provider, and every role's trust policy names it. A new cluster means a new provider, so the restored workloads start, pass their readiness checks and then fail with access denied the first time they touch S3 or a queue. EKS Pod Identity avoids the per-cluster principal: the same role works in any cluster through an association, without editing the trust policy.
Identity also gates the steps you would assume come for free. The database restore reads the backup bucket through an identity. The DNS controller updates records through one, and so does certificate issuance over DNS. Recreate identities with the infrastructure code that creates the cluster, and check them before anything in Argo CD depends on them.
DNS and load balancer addresses
Records are the easy part when a controller like external-dns manages them from annotations in Git. It marks every record it manages with an ownership TXT record and only updates records it owns. Keep the owner ID as a fixed value in the repository. If it is derived from something that changes on rebuild, the new cluster treats the old records as someone else's and leaves them pointing at a load balancer that no longer exists.
Addresses are the other half, and with the right setup they do not change at all. external-dns follows whatever the Service or Ingress reports: when the new load balancer comes up, it rewrites the record to the new target on its own, and nobody touches DNS by hand. Keep the TTL on those records short, so clients that cached the old answer move over within minutes. The zone itself and its delegation come from infrastructure code, like the rest of the account.
For anything a partner allowlists, the aim is that a rebuild produces no new IP at all. The addresses are reserved in infrastructure code, outside the cluster's lifecycle, and the cluster only attaches them. On AWS an internet-facing Network Load Balancer takes reserved Elastic IPs, one per subnet, through the eip-allocations annotation; on GKE a LoadBalancer Service takes a reserved regional address. Egress works the same way: the NAT gateway's Elastic IPs belong to the network code, so a rebuilt cluster sends traffic from the same source address, and payment providers and client firewalls see nothing new.
One case needs planning ahead. Reserved addresses are regional, so if a rebuild may land in another region, reserve addresses there as well and get them onto partner allowlists long before an incident. Set up this way, nobody spends the first hours of a recovery emailing partners. It is a one-time job, and if you want to see how we wire it, talk to us.
Certificates and rate limits
A rebuilt cluster has no certificate Secrets, so every certificate is requested again at the same moment. Let's Encrypt rate limits are generous for normal operation and real for a mass re-issue:
Let's Encrypt limit | Maximum | Refill |
New certificates per registered domain | 50 per 7 days | 1 every 202 minutes |
New certificates for the same set of names | 5 per 7 days | 1 every 34 hours |
New orders per account | 300 per 3 hours | 1 every 36 seconds |
Authorization failures per name per account | 5 per hour | 1 every 12 minutes |
We validate only over DNS and mostly issue wildcard certificates, so a rebuild asks for a handful of certificates instead of one per hostname. HTTP is not allowed for these domains anyway, and only DNS-01 can issue wildcards. The limit to watch is the second row. Rehearse a rebuild three times in a week against production issuance and the same wildcard can be blocked for days. Point rehearsals at the Let's Encrypt staging environment.
Recovery order
Every dependency above has a direction. The sealing key has to exist before the controller decrypts anything, identities before the database reads its bucket, operators before the resources they define, data before the code that migrates it. The order below starts with one commit and has one script step. Everything after that is manifests that Argo CD applies through sync waves and health checks, moved forward by small commits, so the rebuild runs the same mechanism as every deploy.

Recovery order for a GitOps cluster, from the preparation commit to application waves
Preparation: one commit turns off the applications and the databases and switches every database manifest to its recovery variant.
Infrastructure outside the cluster: account, network, reserved addresses, DNS zone, cloud identities and the backup buckets, all from infrastructure code.
The bootstrap script: Argo CD, the sealed-secrets controller and this cluster's sealing key.
The root Application, pinned to the preparation commit, which sits on top of the last known-good state. Only the platform comes up.
Wave -2: CRDs and operators, including the CNPG operator and the ingress, DNS and certificate controllers.
Wave -1: issuers, certificates and DNS records.
Wave 0: a commit turns the databases back on, and the CNPG Clusters restore from object storage.
Wave 1: a last commit turns the applications on once the restored data has been checked, with schema migrations as PreSync hooks and data migrations as PostSync hooks.
One commit to prepare
Before anything is created, we put the repository into recovery mode with a single commit. It turns off the applications and the databases and switches every database manifest to its recovery variant, so the first sync brings up only the platform: operators, controllers, certificates and DNS. However the root Application is templated, this should come down to a couple of values that every child Application reads, prepared and reviewed long before anyone needs them. During an incident the change is then a one-line diff that a second engineer can approve in a minute.
Keeping the databases off at first means the restore starts only once the platform under it is healthy: the CNPG operator is running, the identity that reads the backup bucket works, and nothing can sync a manifest that still says initdb. Keeping the applications off removes a whole class of races. A worker or CronJob that starts too early writes into an empty schema, and a service that sends webhooks or payouts can talk to partners from a half-built system. The next commit turns the databases on, and once the restored data has been checked against the moment of loss, a last commit turns the applications on. Every step of the rebuild after the bootstrap script is a reviewed change in Git.
Keys before controllers
The infrastructure and bootstrap steps are outside Argo CD on purpose. Argo CD does not exist yet, and the sealing key is the one input that every later wave depends on. Loading it in the same script that installs the controller removes an entire class of failure: no SealedSecret is ever applied to a controller holding the wrong key.
CRDs and operators before workloads
Sync waves apply resources from the lowest wave to the highest, and Argo CD moves to the next wave only once the current one is in sync and healthy. Inside one Application it already orders namespaces first and custom resources last. Across Applications in an app of apps there is a catch: Argo CD removed the built-in health check for the Application resource in version 1.8, and the docs say to restore it if you orchestrate child Applications with waves. Without it, a wave of Applications counts as done the moment the objects exist, and your database Cluster arrives while the CNPG operator is still starting.
Data before applications
With a health check on the CNPG Cluster resource, wave 0 counts as done only when recovery has finished and the instances are ready, so wave 1 waits for real data. Then the application wave runs its hooks against it. Our migration hooks are idempotent: the migration tool records what it applied, schema changes run PreSync before the new code, data changes PostSync after it. On a restored database the schema step finds its tables already there and the re-run is a no-op. Readiness stays in the application itself. A service that checks its own database connection before reporting Ready gives the waves an honest signal, and the platform does not need to guess. Because the applications stay off until their own commit, there is also a human check between the two waves: someone confirms the last transaction in the restored database before anything starts serving or writing.
Testing it
A scratch cluster rehearsal
An untested recovery plan is a guess with a document attached. The only way to learn your real recovery time is to rebuild into a scratch cluster with the same script, the same repository and the same backups, under different DNS names and staging certificates, and watch what breaks.
We will be honest about how often this happens. None of our clients has asked for scheduled recovery rehearsals so far, and time for them is hard to win against the roadmap. Our evidence is one full rebuild that went quickly, plus the narrower rehearsals we already run: before a risky Postgres upgrade we restore the latest backup into a scratch cluster and time it, as described in our CNPG major upgrade guide. A full cluster rehearsal is the same habit at a larger scale.
For EU financial entities the choice is already made. DORA, applied since 17 January 2025, requires ICT response and recovery plans to be tested at least yearly (Article 11(6)) and backup and restoration procedures to be tested periodically (Article 12(2)). A timed rebuild log is exactly the evidence that asks for.
Measuring recovery time
Start the clock when someone decides to rebuild, not when the new cluster is ready. Record a timestamp for each step in the order above, and stop the clock when a real user flow works: someone logs in and sees data written before the loss. Argo CD turning green is only a milestone on the way. For the recovery point, compare the last transaction in the restored database with the moment the old cluster died.
Write down everything that broke, fix each one in Git or in the infrastructure code, and rehearse again. The checklist below is where we start.
Outside Git | Where it lives | How it comes back | Check before you need it |
Database contents | Object storage: base backups and WAL | CNPG Cluster with bootstrap.recovery | Recovery variant committed, new serverName, restore timed once |
Sealing key | Managed vault, one per cluster | Bootstrap script, before anything decrypts | Backup refreshed after the last key renewal |
Cloud identities | Cloud account | Infrastructure code, before the root Application | Trust policies do not name the old cluster |
DNS zone and records | Registrar and DNS provider | Zone from infrastructure code, records from external-dns | Owner ID fixed in Git, short TTLs on records that follow the load balancer |
Static and egress addresses | Cloud account | Reserved in infrastructure code, attached to the load balancer and NAT gateway | Same IPs after a rebuild; addresses in the recovery region already on partner allowlists |
Certificates | Re-issued by the certificate controller | DNS-01 issuance in wave -1 | Wildcards in use, staging issuer for rehearsals |
Argo CD itself | Install manifests in Git | Bootstrap script, clean install | Preparation commit reviewed in advance, root Application pinned to it |
When Git-only recovery is enough
Not every cluster needs all of this. If your services are stateless and the data lives in a managed database such as RDS or Cloud SQL, the provider's backups and point-in-time recovery cover the hardest item on the list, and the rebuild is close to what GitOps promises: a script, a root Application, a few minutes of syncing. Building CNPG recovery variants for services that keep no state would be effort spent on the wrong problem.
Even then, three items stay outside Git: the sealing key, the cloud identities and the reserved addresses partners know you by. The list gets shorter. It never gets empty.
Write the list before you need it
One action for this week: write down everything your cluster needs that the repository does not hold. For each item, name where its backup lives, who can restore it and which step of the rebuild it blocks. GitOps already gives you the inventory of what runs; this list is the inventory of what it runs on.
If you want a second pair of eyes on the list or on a rehearsal, talk to an engineer at Amoniac.
SHARE ON SOCIAL MEDIA




