Voiced by Amazon Polly |
Introduction
Continuous Deployment (CD) is a critical part of modern DevOps practices, enabling organizations to deliver updates quickly, reliably, and with minimal downtime. ArgoCD, a declarative GitOps continuous delivery tool for Kubernetes, provides advanced deployment strategies, including Canary Rollouts, to achieve safer and more controlled updates to your applications. Canary deployment involves gradually rolling out changes to a small subset of users before a full release, allowing for quick rollback in case of issues.
This blog explores ArgoCD’s Rollout Canary feature, its popularity, implementation steps, and FAQs for a smooth adoption process.
Pioneers in Cloud Consulting & Migration Services
- Reduced infrastructural costs
- Accelerated application deployment
Why is ArgoCD Rollout Canary Popular?
ArgoCD Rollout Canary is widely adopted because of its ability to automate deployments, integrate seamlessly with Kubernetes, and adhere to GitOps principles. By keeping Git as the single source of truth, it ensures consistency, auditability, and transparency in deployments. It supports progressive delivery, where incremental updates are rolled out, minimizing risks and exposure to failure. Furthermore, integrating with monitoring tools makes rollouts metrics-driven, enabling teams to make informed decisions about promotion or rollback. Canary Rollouts begin by routing a small portion of traffic to the new version while monitoring its performance. If the application behaves as expected, more traffic is gradually routed to the new version. If issues arise, the rollout is paused or rolled back to the previous stable state, ensuring minimal disruption.
Steps to Implement ArgoCD Rollout Canary
- Download the AWS CLI installer:
1 |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" |
2. Install the unzip utility (if not already installed):
1 |
apt install unzip |
3. Extract the installer package:
1 |
sudo unzip awscliv2.zip |
4. Run the installation script:
1 |
sudo ./aws/install |
5. Verify the installation by checking the AWS CLI version:
1 |
aws --version |
Steps to Install eksctl
- Download the latest release and extract it in one command:
1 |
curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp |
2. Move the extracted binary to a directory in your system’s PATH:
1 |
sudo mv /tmp/eksctl /usr/local/bin |
3. Verify the installation by checking the eksctl version:
1 |
eksctl version |
Steps to Install kubectl
- Download the kubectl binary and place it in /usr/local/bin:
1 |
sudo curl --silent --location -o /usr/local/bin/kubectl https://s3.us-west-2.amazonaws.com/amazon-eks/1.22.6/2022-03-09/bin/linux/amd64/kubectl |
2. Make the binary executable:
1 |
sudo chmod +x /usr/local/bin/kubectl |
3. Verify the installation by checking the kubectl version:
1 |
kubectl version --short –client |
4. Check for the updated kubeconfig
1 |
aws eks update-kubeconfig --name demo-eks --region ap-south-1 |
Installing and Configuring ArgoCD
- Add the ArgoCD Helm Repository
1 |
helm repo add argo-cd https://argoproj.github.io/argo-helm |
2. Install ArgoCD Using Helm
1 |
helm install argocd argo-cd/argo-cd |
3. Verify the ArgoCD Deployment and Services
Check the status of the ArgoCD deployment and services:
1 2 |
kubectl get deployment kubectl get svc |
4. Expose the ArgoCD API Server
By default, the ArgoCD API Server is not accessible externally. To expose it using a Load Balancer, run:
1 |
kubectl patch svc argocd-server -p '{"spec": {"type": "LoadBalancer"}}' |
5. Access the ArgoCD Service
Retrieve the EXTERNAL-IP of the argocd-server service:
- Copy the EXTERNAL-IP and open it in a browser.
- If you encounter a security warning, click Advanced and then Proceed to <IP>.
- Log in to ArgoCD
At the login page:
- Username: admin
- Password: Retrieve the initial admin password with this command:
1 |
kubectl get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo |
- Copy the generated password and log in.
- Connect a Repository
Navigate to Settings > Repositories and follow these steps:
- Click the Connect Repo Using HTTPS button.
- Enter your repository credentials and click Connect.
- Create an Application
After connecting the repository, click Create Application to set up your first deployment.
ArgoCD Manifest files:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
rollout.yaml apiVersion: argoproj.io/v1alpha1 kind: Rollout metadata: name: rollouts-demo spec: replicas: 3 selector: matchLabels: app: rollouts-demo strategy: canary: steps: - setWeight: 20 - pause: duration: 2m - setWeight: 40 - pause: duration: 2m - setWeight: 60 - pause: duration: 10s - setWeight: 80 - pause: duration: 10s - setWeight: 100 template: metadata: labels: app: rollouts-demo spec: containers: - name: rollouts-demo image: argoproj/rollouts-demo:green ports: - containerPort: 8080 service.yaml apiVersion: v1 kind: Service metadata: name: rollouts-demo-service spec: selector: app: rollouts-demo ports: - protocol: TCP port: 80 targetPort: 8080 |
Installing Argo CD Rollouts Controller and Kubectl Plugin
Follow these steps to set up the Argo CD Rollouts Controller and install the required kubectl plugin:
- Install the Argo Rollouts Controller
- Create a namespace for Argo Rollouts:
1 |
kubectl create namespace argo-rollouts |
- Apply the installation manifest to deploy the controller:
1 |
kubectl apply -n argo-rollouts -f https://github.com/argoproj/argo-rollouts/releases/latest/download/install.yaml |
- Install the Argo Rollouts Kubectl Plugin
To manage Argo Rollouts, install the kubectl plugin with the following steps:
- Download the plugin binary using curl:
1 |
curl -LO https://github.com/argoproj/argo-rollouts/releases/latest/download/kubectl-argo-rollouts-darwin-amd64 |
For Linux distributions, replace darwin with linux in the URL.
2. Make the binary executable:
1 |
chmod +x ./kubectl-argo-rollouts-darwin-amd64 |
3. Move the binary to your system’s PATH:
1 |
sudo mv ./kubectl-argo-rollouts-darwin-amd64 /usr/local/bin/kubectl-argo-rollouts |
4. Verify the installation by checking the plugin version:
1 |
kubectl argo rollouts version |
Argo rollout Dashboard
Deploying and Monitoring a Rollout with Argo Rollouts
Once you have configured Argo Rollouts, follow these steps to deploy and monitor your Rollout effectively:
- Apply the Rollout Manifest
Ensure the Rollout configuration in your repository is fixed and up-to-date. Deploy the Rollout by applying the YAML manifest:
1 |
kubectl apply -f rollout.yaml |
- Verify the Rollout Status
To check the progress of your Rollout:
1 |
kubectl get rollout rollouts-demo |
- The status will indicate Progressing or Healthy if the deployment is successful.
- If any issues arise, the status will show as Degraded.
For a detailed status report:
1 |
kubectl describe rollout rollouts-demo |
- Inspect Pods and ReplicaSets
To see the Pods and ReplicaSets being created or updated as part of the Rollout:
1 2 3 |
kubectl get pods kubectl get rs |
- Pods will be updated gradually based on the Canary strategy defined in the Rollout configuration.
- Monitor Canary Deployment Progress
If you have the Argo Rollouts CLI installed, you can get more detailed insights into the deployment progress:
1 2 3 |
kubectl argo rollouts get rollout rollouts-demo kubectl argo rollouts get rollout rollouts-demo --watch |
- This displays weight percentages being applied step by step and shows Pod readiness during the Canary process.
- Test Rollback Mechanism
To test the rollback feature, simulate a failure by introducing a faulty image. Edit the Rollout manifest and update the image tag to a non-existent or invalid value:
image: argoproj/rollouts-demo:invalid
Apply the updated manifest and monitor the Rollout status:
1 |
kubectl argo rollouts get rollout rollouts-demo --watch |
- Observe how the Rollout handles the failure and reverts to a stable version.
Conclusion
By leveraging this approach, teams can enhance their deployment confidence, minimize downtime, and maintain application stability during updates.
Drop a query if you have any questions regarding ArgoCD Rollout Canary and we will get back to you quickly.
Making IT Networks Enterprise-ready – Cloud Management Services
- Accelerated cloud migration
- End-to-end view of the cloud environment
About CloudThat
CloudThat is an award-winning company and the first in India to offer cloud training and consulting services worldwide. As a Microsoft Solutions Partner, AWS Advanced Tier Training Partner, and Google Cloud Platform Partner, CloudThat has empowered over 850,000 professionals through 600+ cloud certifications winning global recognition for its training excellence including 20 MCT Trainers in Microsoft’s Global Top 100 and an impressive 12 awards in the last 8 years. CloudThat specializes in Cloud Migration, Data Platforms, DevOps, IoT, and cutting-edge technologies like Gen AI & AI/ML. It has delivered over 500 consulting projects for 250+ organizations in 30+ countries as it continues to empower professionals and enterprises to thrive in the digital-first world.
FAQs
1. What makes ArgoCD Rollout Canary better than traditional deployments?
ANS: – ArgoCD Rollout Canary ensures a gradual and monitored release process, allowing early detection and rollback of issues, which reduces the risk of deployment failures.
2. Can I integrate custom metrics for canary analysis?
ANS: – Yes, Argo Rollouts supports integration with Prometheus and other monitoring tools for custom metric-based decision-making during rollouts.

WRITTEN BY Deepika N
Deepika N works as a Senior Research Associate - DevOps and holds a Master’s degree in Computer Applications. She is passionate about DevOps and related technologies. Deepika has strong expertise in AWS and Azure DevOps, Kubernetes (EKS), Terraform, and CI/CD pipelines. She is proficient in infrastructure as code, automation, monitoring, security enforcement, and multi-cloud deployment strategies. Skilled in version control, infrastructure documentation, cloud-native technologies, and managing production workloads, container platforms, and DevSecOps practices, Deepika brings comprehensive hands-on experience to her role.
Comments