ArgoCD checks your Git repository for changes every 3 minutes by default. This is normal behavior!
.\sync-argocd.ps1This will:
- List all applications
- Force refresh each application
- Show current sync status
Refresh all applications:
kubectl patch application retail-store-ui -n argocd --type merge -p '{"metadata":{"annotations":{"argocd.argoproj.io/refresh":"hard"}}}'
kubectl patch application retail-store-catalog -n argocd --type merge -p '{"metadata":{"annotations":{"argocd.argoproj.io/refresh":"hard"}}}'
kubectl patch application retail-store-cart -n argocd --type merge -p '{"metadata":{"annotations":{"argocd.argoproj.io/refresh":"hard"}}}'
kubectl patch application retail-store-checkout -n argocd --type merge -p '{"metadata":{"annotations":{"argocd.argoproj.io/refresh":"hard"}}}'
kubectl patch application retail-store-orders -n argocd --type merge -p '{"metadata":{"annotations":{"argocd.argoproj.io/refresh":"hard"}}}'Or refresh a specific application:
kubectl patch application retail-store-ui -n argocd --type merge -p '{"metadata":{"annotations":{"argocd.argoproj.io/refresh":"hard"}}}'Step 1: Start port forwarding
kubectl port-forward svc/argocd-server -n argocd 8080:80Step 2: Open browser to http://localhost:8080
Step 3: Login with:
- Username:
admin - Password: Get it with:
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath='{.data.password}' | base64 -d
Step 4: Click on an application and click "REFRESH" or "SYNC"
kubectl get applications -n argocdkubectl get application retail-store-ui -n argocd -o yamlkubectl get applications -n argocd -o custom-columns=NAME:.metadata.name,SYNC:.status.sync.status,HEALTH:.status.health.status,LAST-SYNC:.status.operationState.finishedAtYour applications have automated: true which means:
- ✅ ArgoCD checks Git every 3 minutes
- ✅ Automatically syncs when changes are detected
- ✅
selfHeal: true- fixes drift if someone manually changes resources - ✅
prune: true- removes resources deleted from Git
Default: 3 minutes
To change this, you would need to modify ArgoCD's ConfigMap:
kubectl edit configmap argocd-cm -n argocdAdd:
data:
timeout.reconciliation: 60s # Check every 60 seconds# Edit files
vim src/ui/chart/values.yamlgit add .
git commit -m "Update UI configuration"
git push origin gitops.\sync-argocd.ps1# Check application status
kubectl get applications -n argocd
# Check pods
kubectl get pods -n retail-store
# Check if new version is deployed
kubectl describe pod -n retail-store <pod-name> | grep ImageThis is normal! It means ArgoCD detected changes but hasn't synced yet.
Solution: Wait 3 minutes or force sync:
.\sync-argocd.ps1The application is being deployed.
Check status:
kubectl get pods -n retail-store
kubectl logs -n retail-store <pod-name>There's an issue with the deployment.
Check details:
kubectl get application retail-store-ui -n argocd -o yaml
kubectl describe pod -n retail-store <pod-name>
kubectl logs -n retail-store <pod-name>Check if commit was pushed:
git log --oneline -5
git statusCheck ArgoCD is watching correct branch:
kubectl get application retail-store-ui -n argocd -o yaml | grep -A 5 "source:"Should show:
source:
repoURL: https://github.com/bashairfan0911/retail-store-sample-app
targetRevision: gitops
path: src/ui/chartgit push origin gitopsEither:
- Wait 3 minutes for auto-sync
- Or run:
.\sync-argocd.ps1
kubectl get pods -n retail-store
kubectl get applications -n argocdkubectl logs -n retail-store -l app.kubernetes.io/name=ui --tail=50watch -n 5 kubectl get applications -n argocdkubectl logs -n argocd -l app.kubernetes.io/name=argocd-server --tail=100 -fkubectl logs -n argocd -l app.kubernetes.io/name=argocd-repo-server --tail=100 -f| Action | Command |
|---|---|
| Force sync all | .\sync-argocd.ps1 |
| Check status | kubectl get applications -n argocd |
| View details | kubectl get application <name> -n argocd -o yaml |
| Access UI | kubectl port-forward svc/argocd-server -n argocd 8080:80 |
| Get password | kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath='{.data.password}' | base64 -d |
-
Use the sync script after every push:
git push origin gitops && .\sync-argocd.ps1
-
Create an alias:
# Add to your PowerShell profile function Sync-ArgoCD { .\sync-argocd.ps1 } Set-Alias -Name argocd-sync -Value Sync-ArgoCD
-
Monitor in ArgoCD UI:
- Keep ArgoCD UI open in browser
- Watch real-time sync status
- See detailed deployment logs
Remember: ArgoCD auto-sync is working! It just takes up to 3 minutes. Use the sync script for immediate updates! 🚀