CI/CD with GitHub Actions and Argo CD¶
Outcome¶
This lab now has a complete delivery path for a small application running on the on-premises K3s cluster:
application change
-> GitHub Actions tests
-> container image in GHCR
-> image SHA committed to the Kubernetes manifest
-> Argo CD detects the Git change
-> Kubernetes performs a rolling update
The application is intentionally simple. A static Nginx page keeps the focus on
the delivery process, and /healthz gives the pipeline and Kubernetes probes a
basic endpoint to test.
Division of responsibility¶
| Component | Responsibility |
|---|---|
| GitHub | Stores the application, workflow, and desired Kubernetes state |
| GitHub Actions | Tests source, builds the container, smoke-tests it, publishes it, and updates the image tag |
| GHCR | Stores the immutable SHA-tagged container image |
| Argo CD | Compares Git with the cluster and applies the desired manifests |
| Kubernetes | Schedules Pods, performs the rolling update, and maintains two replicas |
This design keeps Kubernetes credentials out of GitHub Actions. The deployment controller inside the environment pulls configuration from Git rather than a hosted runner pushing directly into the cluster.
Run a test release¶
From the Debian management VM, change the version or styling in the application page, run the small local test, and push it:
cd k8s-cicd-lab
vi app/index.html
bash tests/test-app.sh
git status
git add app/index.html
git commit -m "Update demo application"
git push origin main
Then follow the run in the GitHub Actions page. On the control-plane node, watch Argo CD and the Kubernetes rollout:
Finally, check the application through the internal ingress:
Detailed notes¶
- Phase 4 — GitHub Actions and GHCR
- Phase 5 — Argo CD and self-healing
- Phase 6 — end-to-end release and troubleshooting
- Kubernetes lessons journal
The repository README stays focused on repeating the workflow. The MkDocs lab contains the architecture, installation decisions, failure analysis, and the differences between this environment and a production cluster.