Creating Your First Application
You'll learn: How to deploy a real workload to your Kubernetes cluster by creating an ArgoCD Application resource that syncs your Git repository with your running environment.
The Application Resource in Action
Now that you've connected your Git repository to ArgoCD, it's time to deploy something real. An ArgoCD Application resource is your deployment instruction—it tells ArgoCD what to deploy (your Git manifests), where to deploy it (which cluster and namespace), and how to keep it synchronized.
Think of it like programming a smart thermostat: you set the desired temperature (Git state), point to the room (cluster/namespace), and the thermostat continuously adjusts to maintain that exact setting.
Creating the Application
You can create an Application using the ArgoCD UI or CLI. Here's a basic YAML definition:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: my-first-app
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/your-org/your-repo
targetRevision: main
path: manifests/dev
destination:
server: https://kubernetes.default.svc
namespace: my-app
syncPolicy:
automated:
prune: true
selfHeal: true
This tells ArgoCD to watch the manifests/dev folder in your Git repository's main branch and deploy those Kubernetes manifests to the my-app namespace on your cluster. With automated sync enabled, changes in Git are automatically applied—true GitOps pull-based deployment.
What Happens Next
ArgoCD compares your Git state with your cluster state and deploys the resources. You'll see the sync status in the UI, with a visual representation of all deployed objects.
Key Takeaway: Creating an ArgoCD Application resource connects your Git repository to your Kubernetes cluster, enabling continuous GitOps-based deployment with automatic synchronization and self-healing capabilities.