In this task you will:
- Create a simple Kubernetes manifest
- Push it to a GitHub repo
- Connect ArgoCD to that repo
- Deploy your app automatically
- Test GitOps Sync (manual + auto)
⭐ STEP 1 — Create a GitHub Repo
Create a new GitHub repo:
argocd-demo-app
Add this structure:
argocd-demo-app/
└── deployment.yaml
└── service.yaml
⭐ STEP 2 — Add a Simple NGINX App
deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: demo-app
labels:
app: demo-app
spec:
replicas: 2
selector:
matchLabels:
app: demo-app
template:
metadata:
labels:
app: demo-app
spec:
containers:
- name: nginx
image: nginx:1.27
ports:
- containerPort: 80
service.yaml
apiVersion: v1
kind: Service
metadata:
name: demo-app
spec:
type: LoadBalancer
selector:
app: demo-app
ports:
- port: 80
targetPort: 80
Push to GitHub:
git add .
git commit -m "first argocd app"
git push origin main
⭐ STEP 3 — Create ArgoCD Application
🎨 Create application using UI (Beginner-friendly)
- Open ArgoCD UI
- Click NEW APP
- Fill:
| Field | Value |
| ------------------- | ---------------- |
| Application Name | `demo-app` |
| Project | default |
| Sync Policy | Manual (for now) |
| Repository URL | Your GitHub repo |
| Revision | main |
| Path | `.` |
| Destination Cluster | in-cluster |
| Namespace | default |
- Click create
⭐ STEP 4 — Sync Application
In UI:
👉 Select demo-app
👉 Click SYNC → SYNCHRONIZE
ArgoCD will:
- Pull manifests from GitHub
- Deploy them into your GKE cluster
- Show pods, services, health status graphically
Check app in cluster:
kubectl get pods
kubectl get svc demo-app
Wait for service external IP:
kubectl get svc demo-app -w
Open in browser:
http://<EXTERNAL-IP>
You will see default NGINX page.
⭐ STEP 5 — Test GitOps (VERY IMPORTANT)
Now edit repo:
Edit deployment.yaml:
Change image:
image: nginx:1.27 -> nginx:1.26
Push:
git commit -am "downgrade image"
git push
In ArgoCD:
You will see the app becomes OutOfSync
Click SYNC
ArgoCD will deploy the new version
If you check with ArgoCD,
🎉 This is GitOps!
🌟 Thanks for reading! If this post added value, a like ❤️, follow, or share would encourage me to keep creating more content.
— Latchu | Senior DevOps & Cloud Engineer
☁️ AWS | GCP | ☸️ Kubernetes | 🔐 Security | ⚡ Automation
📌 Sharing hands-on guides, best practices & real-world cloud solutions





Top comments (0)