Live demo: podinfo.wilson.codes
This project demonstrates automated continuous deployment following GitOps practices by utilising Kubernetes, Argo CD and Kustomize.
A custom GitHub Action applies a random UI colour to the application every hour, adding an interactive touch to the automated deployment process.
Argo CD is setup to periodically scan for changes in this repository on branch feat/random-ui-colour
.
A custom Github action updates the app's config file every hour and randomises the UI colour.
Once changes are detected, using git-ops principles, Argo CD uses the state defined in git as the source of truth, and kicks off a workflow to reconcile the cluster's state.
Kustomize provides field replacement based on patches defined in kustomization.yaml
and builds a config map containing new settings, that is then applied to the app deployment.
-
Install Argo CD in your cluster
-
Access in-cluster Argocd UI:
kubectl -n argocd port-forward svc/argocd-server 8080:443
Then navigate to: localhost:8080 -
Fetch the admin password:
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo
-
Login and setup a new application
-
Enable auto-sync and resource pruning
- Setup Argo CD ingress and endpoint
- Use Github event webhooks instead of Argo CD polling
- Setup nginx ingress controller for demo apps to reduce the use of DigitalOcean load balancers