Cloud Computing, DevOps

5 Mins Read

Step-by-Step Guide to ArgoCD Canary Rollouts for Kubernetes

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.

Steps to Implement ArgoCD Rollout Canary

  1. Download the AWS CLI installer:

2. Install the unzip utility (if not already installed):

3. Extract the installer package:

4. Run the installation script:

5. Verify the installation by checking the AWS CLI version:

step5

Steps to Install eksctl

  1. Download the latest release and extract it in one command:

2. Move the extracted binary to a directory in your system’s PATH:

3. Verify the installation by checking the eksctl version:

eks3

Steps to Install kubectl

  1. Download the kubectl binary and place it in /usr/local/bin:

2. Make the binary executable:

3. Verify the installation by checking the kubectl version:

4. Check for the updated kubeconfig

kub4

Installing and Configuring ArgoCD

  1. Add the ArgoCD Helm Repository

2. Install ArgoCD Using Helm

3. Verify the ArgoCD Deployment and Services

Check the status of the ArgoCD deployment and services:

4. Expose the ArgoCD API Server

By default, the ArgoCD API Server is not accessible externally. To expose it using a Load Balancer, run:

argo4

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>.
  1. Log in to ArgoCD

At the login page:

  • Username: admin
  • Password: Retrieve the initial admin password with this command:
  • Copy the generated password and log in.
  1. 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.
  1. Create an Application

After connecting the repository, click Create Application to set up your first deployment.

argo8

argo8b

argo8c

argo8d

argo8e

ArgoCD Manifest files:

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:

  1. Install the Argo Rollouts Controller
  • Create a namespace for Argo Rollouts:
  • Apply the installation manifest to deploy the controller:
  1. Install the Argo Rollouts Kubectl Plugin

To manage Argo Rollouts, install the kubectl plugin with the following steps:

  1. Download the plugin binary using curl:

For Linux distributions, replace darwin with linux in the URL.

2. Make the binary executable:

3. Move the binary to your system’s PATH:

4. Verify the installation by checking the plugin version:

Argo rollout Dashboard

argodash

argodash2

Deploying and Monitoring a Rollout with Argo Rollouts

Once you have configured Argo Rollouts, follow these steps to deploy and monitor your Rollout effectively:

  1. 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. Verify the Rollout Status

To check the progress of your Rollout:

  • 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. Inspect Pods and ReplicaSets

To see the Pods and ReplicaSets being created or updated as part of the Rollout:

  • Pods will be updated gradually based on the Canary strategy defined in the Rollout configuration.
  1. Monitor Canary Deployment Progress

If you have the Argo Rollouts CLI installed, you can get more detailed insights into the deployment progress:

  • This displays weight percentages being applied step by step and shows Pod readiness during the Canary process.
  1. 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:

  • Observe how the Rollout handles the failure and reverts to a stable version.

Conclusion

ArgoCD Rollout Canary is a robust deployment strategy that ensures safe and reliable application updates by combining GitOps practices, progressive delivery, and metrics-driven monitoring.

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
Get Started

About CloudThat

CloudThat is a leading provider of Cloud Training and Consulting services with a global presence in India, the USA, Asia, Europe, and Africa. Specializing in AWS, Microsoft Azure, GCP, VMware, Databricks, and more, the company serves mid-market and enterprise clients, offering comprehensive expertise in Cloud Migration, Data Platforms, DevOps, IoT, AI/ML, and more.

CloudThat is the first Indian Company to win the prestigious Microsoft Partner 2024 Award and is recognized as a top-tier partner with AWS and Microsoft, including the prestigious ‘Think Big’ partner award from AWS and the Microsoft Superstars FY 2023 award in Asia & India. Having trained 650k+ professionals in 500+ cloud certifications and completed 300+ consulting projects globally, CloudThat is an official AWS Advanced Consulting Partner, Microsoft Gold Partner, AWS Training PartnerAWS Migration PartnerAWS Data and Analytics PartnerAWS DevOps Competency PartnerAWS GenAI Competency PartnerAmazon QuickSight Service Delivery PartnerAmazon EKS Service Delivery Partner AWS Microsoft Workload PartnersAmazon EC2 Service Delivery PartnerAmazon ECS Service Delivery PartnerAWS Glue Service Delivery PartnerAmazon Redshift Service Delivery PartnerAWS Control Tower Service Delivery PartnerAWS WAF Service Delivery PartnerAmazon CloudFront and many more.

To get started, go through our Consultancy page and Managed Services PackageCloudThat’s offerings.

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 Research Associate - DevOps and holds a Master's in Computer Applications. She is interested in DevOps and technologies. She helps clients to deploy highly available and secured application in AWS. Her hobbies are singing and painting.

Share

Comments

    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!