Learn how to implement GitOps workflows with ArgoCD. Automate Kubernetes deployments using Git as the single source of truth.
GitOps revolutionizes how we deploy applications. This guide shows you how to implement GitOps with ArgoCD.
GitOps uses Git as the single source of truth for infrastructure and application deployments.
Principles:
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
# Get admin password
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: my-app
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/user/repo
targetRevision: HEAD
path: k8s/
destination:
server: https://kubernetes.default.svc
namespace: default
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
syncPolicy:
syncOptions:
- CreateNamespace=true
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
# Production
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: app-prod
spec:
source:
repoURL: https://github.com/user/repo
path: k8s/prod
destination:
namespace: production
---
# Staging
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: app-staging
spec:
source:
repoURL: https://github.com/user/repo
path: k8s/staging
destination:
namespace: staging
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: root-app
spec:
source:
repoURL: https://github.com/user/repo
path: argocd/apps
destination:
server: https://kubernetes.default.svc
namespace: argocd
syncPolicy:
automated:
prune: true
ArgoCD makes GitOps simple and powerful. Start with manual sync and gradually move to automated workflows as you gain confidence.
For GitOps with ArgoCD: Automating Kubernetes Deployments, define pre-deploy checks, rollout gates, and rollback triggers before release. Track p95 latency, error rate, and cost per request for at least 24 hours after deployment. If the trend regresses from baseline, revert quickly and document the decision in the runbook.
Keep the operating model simple under pressure: one owner per change, one decision channel, and clear stop conditions. Review alert quality regularly to remove noise and ensure on-call engineers can distinguish urgent failures from routine variance.
Repeatability is the goal. Convert successful interventions into standard operating procedures and version them in the repository so future responders can execute the same flow without ambiguity.
For GitOps with ArgoCD: Automating Kubernetes Deployments, define pre-deploy checks, rollout gates, and rollback triggers before release. Track p95 latency, error rate, and cost per request for at least 24 hours after deployment. If the trend regresses from baseline, revert quickly and document the decision in the runbook.
Keep the operating model simple under pressure: one owner per change, one decision channel, and clear stop conditions. Review alert quality regularly to remove noise and ensure on-call engineers can distinguish urgent failures from routine variance.
Repeatability is the goal. Convert successful interventions into standard operating procedures and version them in the repository so future responders can execute the same flow without ambiguity.
For GitOps with ArgoCD: Automating Kubernetes Deployments, define pre-deploy checks, rollout gates, and rollback triggers before release. Track p95 latency, error rate, and cost per request for at least 24 hours after deployment. If the trend regresses from baseline, revert quickly and document the decision in the runbook.
Keep the operating model simple under pressure: one owner per change, one decision channel, and clear stop conditions. Review alert quality regularly to remove noise and ensure on-call engineers can distinguish urgent failures from routine variance.
Repeatability is the goal. Convert successful interventions into standard operating procedures and version them in the repository so future responders can execute the same flow without ambiguity.
For GitOps with ArgoCD: Automating Kubernetes Deployments, define pre-deploy checks, rollout gates, and rollback triggers before release. Track p95 latency, error rate, and cost per request for at least 24 hours after deployment. If the trend regresses from baseline, revert quickly and document the decision in the runbook.
Keep the operating model simple under pressure: one owner per change, one decision channel, and clear stop conditions. Review alert quality regularly to remove noise and ensure on-call engineers can distinguish urgent failures from routine variance.
Repeatability is the goal. Convert successful interventions into standard operating procedures and version them in the repository so future responders can execute the same flow without ambiguity.
A field report from rolling out retrieval-augmented generation in production, including cache bugs, bad embeddings, and how we fixed them.
RAG Retrieval Quality Evaluation. Practical guidance for reliable, scalable platform operations.
Explore more articles in this category
Practical game day scenarios for CI/CD: broken rollbacks, permission issues, and slow feedback loops—and how we fixed them.
A practical risk-management framework for release timing, Friday deployment policies, progressive delivery, and how elite teams protect reliability and people.
A practical way to define SLOs and error budgets, connect them to release decisions, and avoid reliability debates without data.