curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.29.6+k3s2 sh -s - --write-kubeconfig-mode 644VERSION=$(curl --silent "https://api.github.com/repos/argoproj/argo-cd/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
curl -sSL -o argocd-linux-amd64 "https://github.com/argoproj/argo-cd/releases/download/${VERSION}/argocd-linux-amd64"
chmod +x argocd-linux-amd64
sudo mv argocd-linux-amd64 /usr/local/bin/argocd
argocd versionkubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yamlChange the Argo CD server service type to NodePort:
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "NodePort"}}'Retrieve the NodePort:
kubectl get svc argocd-server -n argocdExample access URL: http://localhost: (e.g. http://localhost:30084)
kubectl -n argocd get secret argocd-initial-admin-secret \
-o jsonpath="{.data.password}" | base64 -d; echoargocd login localhost:30084 --username admin --password <PASSWORD> --insecurekubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj-labs/argocd-image-updater/master/manifests/install.yaml
kubectl get pods -n argocd -l app.kubernetes.io/name=argocd-image-updaterCheck Image Updater logs:
kubectl logs -n argocd deploy/argocd-image-updater- Fork this repo: https://github.com/Ompragash/app-repo
- In your forked repo, add the following secrets under Settings > Secrets and Variables > Actions:
- DOCKERHUB_USERNAME
- DOCKERHUB_PASSWORD
These credentials allow the GitHub Action to build and push a new image to Docker Hub whenever you push to main.
- Fork this repo: https://github.com/Ompragash/manifest-repo
- In ./k8s/deployment.yaml, update the Docker image at line 19 to the image built from your app-repo step.
- In ./application.yaml, update the Docker image at line 9 and the repo URL at line 22 with your forked repository details.
After updating the above, pushing the changes, clone the fork in your local and apply the application.yaml:
kubectl apply -f application.yaml -n argocdThis deploys the sample app for Argo CD to manage.
argocd app list
argocd app get my-webappAccess the app at http://localhost:30080 (or the NodePort you have set in your service.yaml).
Add your forked manifest repository to Argo CD with credentials:
argocd repo add https://github.com/FORK_USERNAME/manifest-repo.git \
--username $GITHUB_USERNAME \
--password $GITHUB_PAT \
--insecure-ignore-host-keyNow, modify server.js in your app-repo fork at line 7 and push the changes. This triggers a GitHub Action that builds and pushes a new image to Docker Hub.
Once the new image is available, Argo CD Image Updater detects it, updates the manifest in Git (basically, it'll update the live application spec), and Argo CD applies the changes automatically.
Refresh http://localhost:30080 to see your updated application, confirming the entire pipeline works end-to-end.
Happy Automating!🚀