GitOps keeps a Kubernetes cluster in sync with manifests in Git. The main tools, from Argo CD and Flux to Spinnaker and push-based pipelines, and when infrastructure from code replaces the manifest layer for application infra.
GitOps answered how a Kubernetes cluster stays aligned with Git: a controller watches a repository, applies what it finds, and corrects drift. Argo CD and Flux own that pattern in most clusters today. What GitOps does not remove is the YAML behind every service. Deployments, services, ingress, config maps and secrets still live as manifests or Helm charts, and the database or queue the service depends on usually lives in yet another tool.
Teams shop GitOps tools either for a different controller model or because the manifest layer itself is the cost. This guide ranks the main options, puts Encore first where the goal is infrastructure from code for application infra, and closes with when to pick which.
Application infrastructure in Encore is infrastructure from code. The platform provisions and deploys into your own AWS or GCP account. With Kubernetes chosen as the compute platform, Encore provisions a new GKE or EKS Fargate cluster or deploys to an existing one, and generates a namespace per environment, a deployment per service with resource requests, limits and health checks, ingress with TLS, and Kubernetes Secrets bound to the service accounts that need them, as described in the Kubernetes docs. The Git repository holds application code rather than charts, and each push to an environment's branch triggers a deploy through the GitHub integration.

Resources outside the cluster are declared next to the endpoints. An inventory service with a database and an hourly sync job:
// inventory/inventory.ts
import { api } from "encore.dev/api";
import { CronJob } from "encore.dev/cron";
import { SQLDatabase } from "encore.dev/storage/sqldb";
const db = new SQLDatabase("inventory", { migrations: "./migrations" });
export const stock = api(
{ expose: true, method: "GET", path: "/stock/:sku" },
async ({ sku }: { sku: string }): Promise<{ sku: string; quantity: number }> => {
const row = await db.queryRow<{ quantity: number }>`
SELECT quantity FROM stock WHERE sku = ${sku}
`;
return { sku, quantity: row?.quantity ?? 0 };
},
);
export const syncSuppliers = api({}, async (): Promise<void> => {
// Pull supplier stock levels and update the stock table here.
});
const _ = new CronJob("sync-suppliers", {
title: "Sync supplier stock",
every: "1h",
endpoint: syncSuppliers,
});
The migration in inventory/migrations/1_create_stock.up.sql creates the table:
CREATE TABLE stock (
sku TEXT PRIMARY KEY,
quantity INT NOT NULL DEFAULT 0
);
Run in your terminal to get started locally.
encore run starts the service with a local Postgres and applies the migrations, though cron jobs only run in cloud environments. On deploy, the database becomes Cloud SQL or RDS, the cron job is scheduled by Encore, and the service runs as a deployment in the cluster. Environments can require infrastructure approval so an admin signs off on infrastructure changes before a deploy proceeds, which covers the review step teams often use GitOps pull requests for. An AI coding agent adding the cron job writes it in the same change as the endpoint, runs it under encore run for the API and database, and the cloud deploy creates the schedule.
Encore is not a cluster GitOps controller: platform teams still use Argo or Flux for cluster add-ons, service meshes and policy charts, while Encore replaces the application-layer manifests and the separate Terraform for the databases, queues, object storage and cron those services need.
Best fit: teams on GKE or EKS who want infrastructure from code for services, databases and queues, and are willing to keep GitOps for the cluster platform layer if they have one.
Argo CD is the CNCF graduated GitOps controller people usually mean when they say GitOps. A controller in the cluster watches Git, Helm or OCI sources and syncs Applications to the desired state, with a web UI that shows health, diffs and sync history across clusters. Progressive delivery pairs with Argo Rollouts for canaries and blue/green. Multi-tenancy uses Projects, RBAC and destinations.
You still author every Deployment, Service, Ingress and chart value the Application points at, and anything outside Kubernetes (RDS, Cloud SQL, managed queues) stays in another system. Argo CD is the default when the goal is pull-based sync with a dashboard operators already know.
Best fit: platform and application teams standardizing on Kubernetes GitOps with a shared UI.
Flux, the other CNCF graduated GitOps project, runs as a set of controllers: the source controller fetches Git repositories, Helm repositories and OCI artifacts, the kustomize and helm controllers apply them, the notification controller handles alerts and webhooks, and image automation controllers can update image tags in Git. Everything is configured through Kubernetes resources and the flux CLI. The core project has no web UI like Argo CD's, so visibility comes from the CLI, Kubernetes dashboards or third-party UIs.
Best fit: platform teams that want GitOps built from Kubernetes-native pieces without a central Argo-style UI.
Spinnaker, created at Netflix, is a continuous delivery platform built around pipelines with stages for baking, deploying, manual judgment and verification. It deploys to Kubernetes and to cloud VMs across AWS, GCP and Azure, and supports canary analysis and red/black deployments. It is push-based rather than GitOps, and it is heavy to operate, with several microservices to run and upgrade.
Best fit: large engineering organizations with multi-stage, multi-cloud release processes.
Some teams skip a GitOps controller and deploy from CI. A workflow builds the image, pushes it to a registry and runs kubectl apply or helm upgrade, using OIDC for short-lived cloud credentials and GitHub environments with required reviewers for production. It is simple and keeps the logic in one place, while CI holds credentials for the cluster and nothing corrects drift between deploys.
Best fit: small teams with one or two clusters and a short manifest set.
Pick Argo CD when Kubernetes GitOps with a UI is the requirement. Pick Flux when the platform team wants the same model as composable controllers. Pick Spinnaker when releases span clouds and need staged approvals and canary analysis at organizational scale. Pick GitHub Actions when a push-based workflow is enough and drift correction is not the priority.
Pick Encore when the work you want gone is the application manifests, charts and separate infrastructure tooling for databases, queues, object storage and cron, and the compute target is GKE or EKS (or Fargate) in your own AWS or GCP account. Keep Argo or Flux for cluster platform charts if you still need them; use infrastructure from code for the services those charts used to wrap.
Argo CD and Flux CD are the standard pull-based GitOps controllers for Kubernetes. Spinnaker covers large multi-cloud release pipelines. GitHub Actions remains the common push-based alternative when you prefer a push model over a cluster-side reconciler.
Argo CD and Flux both reconcile a cluster from Git. Argo CD ships a web UI and an Application resource model that works as a deployment dashboard, while Flux is a set of composable controllers configured through Kubernetes resources and the flux CLI, without a built-in UI like Argo's.
GitOps stores desired cluster state as manifests or charts in Git and a controller applies them, while infrastructure from code declares databases, queues, object storage, cron and services in application code and the platform provisions them. Teams often use GitOps for cluster add-ons and infrastructure from code for the application layer.
With Encore, define the service and its SQLDatabase or Pub/Sub topic in TypeScript, connect your GCP account, and choose Kubernetes as the compute for the environment. On git push, Encore builds the service, generates the Deployment, Service, ingress and Secrets, and provisions Cloud SQL or Pub/Sub beside the cluster.
Deploy to your cloud on AWS and Google Cloud
without managing infrastructure
Encore lets developers and agents define application infrastructure directly in code, then automatically provisions it from local development to production in your AWS or GCP account.