If you building a Kubernetes homelab, one of the first things you will want is a place to store your YAML files, Helm values, and scripts and we deployed Forgejo. This post covers deploying ArgoCD and It watches our Git repo in our Forgejo and ensures our cluster always matches what’s declared there. If someone makes a manual change, ArgoCD drifts it back. Sound familiar in vKS?
Install Argo in GitOps namespace
helm repo add argo https://argoproj.github.io/argo-helm
helm install my-argo-cd argo/argo-cd --version 9.4.17 \
--namespace gitops \
--create-namespaceExpose the UI — Manual NodePort Service
kubectl apply -f argocd-ui-svc.yaml
apiVersion: v1
kind: Service
metadata:
name: argocd-ui
namespace: gitops
spec:
type: NodePort
selector:
app.kubernetes.io/name: argocd-server
ports:
- name: http
port: 80
targetPort: 8080
nodePort: 30074Get Initial Admin Password
kubectl get secret argocd-initial-admin-secret -n gitops -o jsonpath='{.data.password}' | base64 -dConnect ArgoCD to Forgejo
ArgoCD connects to Forgejo using the Kubernetes internal service DNS
Repository URL Format
http://my-forgejo-http.git.svc.cluster.local:3000/awk/homelab.git
Breakdown:
- my-forgejo-http — Forgejo service name
- git — namespace
- svc.cluster.local — Kubernetes internal DNS suffix
- 3000 — container port (not the NodePort 30040)
- /awk/homelab.git — your repo path
Steps in ArgoCD UI
- Settings → Repositories → Connect Repo
- Connection method: VIA HTTPS
- Type: git
- Repository URL: http://my-forgejo-http.git.svc.cluster.local:3000/awk/homelab.git
- Enter Forgejo username and password
- Click Connect
The GitOps Loop
ArgoCD compares the desired state in Git against the live state in the cluster. When they differ it shows OutOfSync. Clicking Sync applies the Git state to the cluster.
First Application — technitium-dns
| Field | Value |
| Application Name | technitium-dns |
| Project | default |
| Repository URL | http://my-forgejo-http.git.svc.cluster.local:3000/awk/homelab.git |
| Revision | main |
| Path | dns |
| Cluster URL | https://kubernetes.default.svc |
| Namespace | dns |

GitOps Cycle
- Edit YAML file locally
- git add, git commit, git push to Forgejo
- ArgoCD shows OutOfSync after Refresh
- Click Sync — ArgoCD runs kubectl apply
- Cluster matches Git state

