New to Kestra?
Use blueprints to kickstart your first workflows.
Provision an Argo CD Application with kubectl, run a pruning sync, and verify status before and after reconciliation in one Kestra GitOps flow.
Manage an Argo CD Application end to end from a single Kestra flow: create the GitOps Application manifest, sync it to your Kubernetes cluster, and verify reconciliation status before and after the sync. Instead of stitching together kubectl apply, the Argo CD CLI, and manual status checks across separate scripts, this blueprint turns the full create, sync, and verify loop into one declarative, auditable, repeatable pipeline. It is ideal for teams running GitOps deployments who want to trigger and observe Argo CD reconciliation as a governed, orchestrated step rather than a side effect of a Git push.
create_argocd_app uses io.kestra.plugin.kubernetes.kubectl.Apply to apply an Argo CD Application manifest (argoproj.io/v1alpha1) to the cluster, pointing at a Git repoURL, targetRevision, and path.get_argocd_app_status_before_sync calls io.kestra.plugin.argocd.apps.Status to capture the application health and sync state before reconciliation.sync_argocd_app runs io.kestra.plugin.argocd.apps.Sync with prune: true and revision: HEAD to reconcile desired state and remove resources no longer defined in Git.get_argocd_app_status_after_sync calls io.kestra.plugin.argocd.apps.Status again to confirm the post-sync state, giving you a clear before-and-after record.Argo CD connection details (server, token) are injected through pluginDefaults so the Status and Sync tasks stay clean.
outputs.create_argocd_app, outputs.get_argocd_app_status_before_sync, and outputs.get_argocd_app_status_after_sync.Argo CD reconciles continuously on its own, but it cannot coordinate everything that should happen around a deployment. With Kestra you can trigger a sync from upstream events (a CI build, a webhook, an approval), gate it behind other tasks, add retries on transient failures, and keep full execution lineage of who synced what and when. The before and after Status tasks give you an explicit reconciliation record that Argo CD's own scheduler does not surface as a discrete, queryable run. Everything is declarative YAML, version controlled alongside the rest of your pipelines.
Application.K8S_MASTER_URL: Kubernetes API server URL for kubectl access.K8S_TOKEN: Bearer token with permission to create Argo CD Applications.ARGOCD_SERVER: Argo CD API endpoint (for example, https://argocd.example.com).ARGOCD_TOKEN: Argo CD API token with access to the target application.name, repoURL, targetRevision, and path to point at the app you want to deploy.Schedule or webhook trigger to run reconciliation on a cadence or on Git events.Sync task for failed reconciliations.Status to alert when health is degraded or out of sync.