This repository contains the setup and implementation of a GitOps pipeline using Argo CD for continuous deployment and Argo Rollouts for canary releases in a Kubernetes cluster.
I also created a video for this assignment => Video
- Created a GitHub repository to host the source code and Kubernetes manifests name ArgoCD-project.
- Created a Dockerfile to build the docker image for the Webapp.
- I have added 2 manifests files.
- Created a GitHub actions workflow do to the continous integration part.
- Built a Docker image for the web application.
- Pushed the Docker image to DockerHub.
- Update the manifest file with the new image
- I have used minikube for this project, where we had 1 node (control plane)
- Followed the official Argo CD documentation to install and set up Argo CD in the Kubernetes cluster.
- Modified the Kubernetes manifests in the repository to utilize the Docker image.
- Configured Argo CD to monitor the repository and automatically deploy changes to the Kubernetes cluster.
- Installed the Argo Rollouts controller in the Kubernetes cluster as per the official guide.
- Modified the deployment.yaml file to Argo Rollouts kind.
- Specified a canary release strategy in the rollout definition.
- Made changes to the application, updated the Docker image, and pushed the new version to the registry.
- Updated the rollout definition to use the new image with Github actions.
- Utilized Argo Rollouts Dashboard to monitor the deployment of the new version, ensuring the canary release successfully completed.
.github/workflows/argocicd.yaml
: Github action workflow filemanifests/
: Contains Kubernetes manifests for deploying the application.Dockerfile
: Dockerfile for building the application Docker image.README.md
: Documentation explaining the setup and implementation of the GitOps pipeline.
To cleanly remove all resources created during this assignment from the Kubernetes cluster, follow these steps:
- Delete the Argo CD installation using the following command:
kubectl delete -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
- Now delete the namespace with the command:
kubectl delete ns argocd
- Delete the Argo Rollout installation using the following command:
kubectl delete -n argo-rollouts -f https://github.com/argoproj/argo-rollouts/releases/latest/download/install.yaml
- Now delete the namespace with the command:
kubectl delete ns argo-rollouts
- Now delete the Webapp namespace that we have created whil add application in argo dashboard
kubectl delete ns webapp