Engineering-PerfAgents

Automating Kubernetes Deployments with ArgoCD

Written by Anjith Padmanabhan | Oct 11, 2024 8:15:38 PM

Introduction

At PerfAgents, we know how important it is to deliver product updates quickly and reliably.

At its core, PerfAgents is a synthetic monitoring platform that helps companies across multiple industries understand how well their digital assets perform from the location of their end users.

To ensure our platform runs smoothly and delivers feature updates efficiently, we have adopted a GitOps-based approach powered by ArgoCD. This allows us to manage the deployment and configuration of our Kubernetes-based infrastructure declaratively, ensuring everything stays consistent and can be quickly rebuilt if needed. It also allows us to make updates across our entire system without fail.

By integrating ArgoCD into our CI/CD pipeline, we have simplified and automated deploying new features, bug fixes, and infrastructure changes to our Kubernetes clusters. Using ArgoCD for K8s-based deployments ensures the reliability of our platform and allows us to respond to customer needs faster so that we can add new features and improvements quickly and confidently.

This blog post will explain how ArgoCD helps us streamline deployments, improve our platform's stability, and deliver blazing-fast, top-notch feature deployments to our customers.

Challenges (with Jenkins)

ArgoCD offers several advantages over traditional CI/CD pipelines like Jenkins, particularly for a company like PerfAgents, which manages multiple deployments across various environments.

Traditional CI/CD tools such as Jenkins pose a few challenges, and here is an excerpt on some of these challenges at the functional level:

  • Infrastructure as Code: Traditional CI/CD pipelines often rely on script or command-based approaches to define the deployment process, making version control and collaboration on infrastructure configuration more challenging. Hence, Jenkins can sometimes be a bit complex for IaC projects.
  • GitOps Workflow: Traditional CI/CD pipelines may not provide a native GitOps workflow in which the desired application state is stored in a Git repository. This can make collaboration, visibility, and auditability more challenging.
  • Multi-Cluster and Multi-Tenant Support: Traditional pipelines, which may not have built-in support for these scenarios, can make handling deployments across multiple Kubernetes clusters and namespaces more challenging.
  • Rollback and Promotion: Traditional CI/CD pipelines make performing rollbacks or promotions of application versions more complex and error-prone. A conventional CI/CD tool like Jenkins does not have the same level of built-in functionality as ArgoCD.
  • Deployment Health Monitoring: Traditional CI/CD pipelines like Jenkins do not have a built-in capability to monitor the health and status of deployed applications continuously. This means issues or failures after the initial deployment may go unnoticed, requiring additional manual intervention and monitoring.
  • Security: CI/CD pipelines that run entirely outside of the Kubernetes cluster would require outside access to the cluster to deploy the new version to the cluster, which poses a security risk, and it is further increased in case of using services like EKS, GKS or AKS as it would require additional access to that as well.

Why ArgoCD?

PerfAgents is built on top of an event-driven microservices-based architecture. Hence, fast and reliable deployments are as complex as they are critical. We need to ensure that our monitoring services are always available and up to date.

ArgoCD helps us do this in a few ways.

At first, it lets us monitor the health of each deployment. If something goes wrong during an update, we can find it and fix it quickly. This minimizes downtime and keeps things running smoothly for our users.

Second, ArgoCD lets us quickly roll back to a previous version of our service if needed. This is important for maintaining reliability. If a new update has problems, we can switch back to a stable version until we fix the issue.

Finally, ArgoCD is a popular tool for GitOps' continuous delivery, which makes it an excellent fit for making our internal tooling reliable and performant. It automates how we deploy updates and works seamlessly with Kubernetes, the computing service that powers our platform. 

Some of the benefits we achieved using ArgoCD:

  • With ArgoCD, we could define the deployment process more declarative.
  • With ArgoCD, we could fit in the deployment to Kubernetes and adopt the custom GitOps workflow we have defined.
  • PerfAgents APIs and Microservices adopt a fully cloud-native multi-tenant complex SaaS architecture, and decoupled deployments are the de facto for us. ArgoCD helps us achieve that in a simplified manner. It is now easier for individual developers to manage their deployments independently.
  • It also helps us maintain immutable infrastructure.
  • Drift detection and self-healing are a lot easier with ArgoCD.
  • Rollbacks are a lot more straightforward than before.
  • The visibility and traceability it provides in case of failures is a blessing to time-crunched teams like ours.
  • Kubernetes is already so complex. Using ArgoCD to manage some of the custom policies and Kubernetes-native resources is a time-saver for us.
  • With ArgoCD, issues or failures after the initial deployment may not go unnoticed.
  • The cherry on the cake is the security features it provides, which reduce the risk of unauthorized access and potential security breaches. 

Conclusion

In summary, leveraging ArgoCD has addressed the limitations of traditional CI/CD pipelines and transformed PerfAgents' deployment processes.

By adopting a GitOps approach, we've achieved greater efficiency, visibility, and collaboration in managing infrastructure changes. ArgoCD's scalability and multi-tenant support seamlessly accommodate our growth and diverse customer base. Its built-in features like drift detection, self-healing, and rollback capabilities significantly enhance platform reliability and resilience.

In short, it helps us deliver new features and improvements confidently while simplifying the management of our expanding Kubernetes infrastructure. The increased efficiency and stability gained through ArgoCD help our team focus on its core mission: providing exceptional synthetic monitoring services to our valued customers.

As PerfAgents continues to innovate and grow, ArgoCD will remain a critical tool in our commitment to delivering a reliable and high-performing monitoring SaaS solution.

Infrastructure as Code: InfrastructureInfrastructuras Code: as Code: