CICD-291 · Argo CD application creation
Encyclopedia · Advanced GitOps and progressive delivery · All snippets
Previous · CICD-290 · Next · CICD-292
1. Where it fits
- Placement gitops/application.yaml.
- Prerequisites trusted configuration repository, test cluster and named GitOps controller or rollout controller.
- Platforms kubernetes, local-lab.
2. Copy the snippet
yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata: {name: web-staging, namespace: argocd}
spec:
project: default
source: {repoURL: "https://github.com/example/platform-config.git", targetRevision: main, path: environments/staging/web}
destination: {server: "https://kubernetes.default.svc", namespace: staging}3. How it works
The Application connects a revision and path in Git to a namespace in the cluster. Argo CD renders desired state and reports sync and health.
4. Verify the result
Replace the repo URL and use a scoped AppProject in real environments. Expect the application to render and expose its sync state.
Validation syntax-validated (YAML parse). Status definitions.