Book Image

Argo CD in Practice

By : Liviu Costea, Spiros Economakis
Book Image

Argo CD in Practice

By: Liviu Costea, Spiros Economakis

Overview of this book

GitOps follows the practices of infrastructure as code (IaC), allowing developers to use their day-to-day tools and practices such as source control and pull requests to manage apps. With this book, you’ll understand how to apply GitOps bootstrap clusters in a repeatable manner, build CD pipelines for cloud-native apps running on Kubernetes, and minimize the failure of deployments. You’ll start by installing Argo CD in a cluster, setting up user access using single sign-on, performing declarative configuration changes, and enabling observability and disaster recovery. Once you have a production-ready setup of Argo CD, you’ll explore how CD pipelines can be built using the pull method, how that increases security, and how the reconciliation process occurs when multi-cluster scenarios are involved. Next, you’ll go through the common troubleshooting scenarios, from installation to day-to-day operations, and learn how performance can be improved. Later, you’ll explore the tools that can be used to parse the YAML you write for deploying apps. You can then check if it is valid for new versions of Kubernetes, verify if it has any security or compliance misconfigurations, and that it follows the best practices for cloud-native apps running on Kubernetes. By the end of this book, you’ll be able to build a real-world CD pipeline using Argo CD.
Table of Contents (15 chapters)
1
Part 1: The Fundamentals of GitOps and Argo CD
4
Part 2: Argo CD as a Site Reliability Engineer
7
Part 3: Argo CD in Production

Preface

GitOps is not a topic that is hard to understand; you use a Git repository to declaratively define the state of your environments and by doing so, you gain versioning and changes by merge requests, which makes the whole system auditable.

But once you start adopting it and use a tool such as Argo CD, things will start becoming more complex. First, you need to set up Argo CD correctly, keeping in mind things such as observability and high availability. Then, you need to think about the CI/CD pipelines and how the new GitOps repositories will be integrated with them. And there will be organizational challenges: how do you integrate each team into this new setup? Most likely, they had different types of Kubernetes access based on the namespace they were deploying to, so Role-based Access Control (RBAC) took time to be properly configured, and now you need to take into consideration how the existing teams’ access will be transferred to the new GitOps engine.

Of course, there are many resources out there (articles, videos, and courses), but it is not easy to navigate them as they only deal with parts of these topics, and not all of them have a good level of detail.

So, it is not easy to gain an idea of what the overall adoption of Argo CD means.

We wrote this book in order for you to have a guide to understand the steps you need to take to start using Argo CD, to allow you to see the complete picture, from installation to setting up proper access control, and the challenges you will face when running it in production, including advanced scenarios and troubleshooting.

We started with GitOps early at our companies and we both were able to see the journey up close. Initially, we even thought about building our own GitOps operator, (like, how hard can it be?), but after 2-3 weeks of analyzing what we needed to do, we dropped the idea. We faced many challenges, some we handled better, while some took us a lot of time to get right, but we learned from all of them, and this is what we want to share with you. We know that, by using this book, you will be able to accelerate your Argo CD and GitOps adoption.