🔄 Bootstrap GitOps with Argo CD
Install Argo CD, connect repo, and sync an app to the cluster. · ~40 min
Reviewed: ·Tested on: Kubernetes 1.29, Terraform 1.8, Ubuntu 22.04
If you're on Kubernetes 1.27 or older
- Ingress: networking.k8s.io/v1 is required — v1beta1 removed in 1.22+
- Pod Security: PodSecurityPolicy removed in 1.25 — use Pod Security Admission (PSA) labels
- HPA v2 autoscaling/v2 is stable — check API version in manifests
If you're on Kubernetes 1.28
- Sidecar containers (1.29+) change init-container ordering — review sidecar docs before upgrade
- Verify metrics-server and HPA after control plane bump
If you're on Terraform 1.7 or older
- S3 native locking (use_lockfile) differs from DynamoDB — don't mix backends mid-migration
- Provider version constraints: run terraform init -upgrade after bump
- terraform test (1.6+) replaces some external test harness patterns
1. Install Argo CD
kubectl create namespace argocd kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml kubectl wait --for=condition=available deploy/argocd-server -n argocd --timeout=300s
2. Access UI and login
kubectl port-forward svc/argocd-server -n argocd 8080:443
# initial admin password:
kubectl get secret argocd-initial-admin-secret -n argocd -o jsonpath='{.data.password}' | base64 -d3. Register Git repo + Application
argocd repo add https://github.com/org/app.git --username git --password $TOKEN argocd app create myapp --repo https://github.com/org/app.git --path k8s --dest-server https://kubernetes.default.svc --dest-namespace apps
4. Sync and verify
argocd app sync myapp argocd app wait myapp --health kubectl get pods -n apps
Related runbook: Open runbook →