Argo CD in Practice: The GitOps way of managing cloud-native applications
Build CD pipelines following GitOps principles like declarative and immutable changes stored in version control, all continuously reconciled by Argo CD, and minimize the failure of deployments.
Purchase of the print or Kindle book includes a free eBook in the PDF format.
- Discover how to apply GitOps principles to build real-world CD pipelines
- Understand Argo CD components and how they work together to reconcile cloud native applications
- Learn to run Argo CD in production with declarative config changes, security, observability, disaster recovery, and more
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.
What you will learn
- Understand GitOps principles and how they relate to IaC
- Discover how Argo CD lays the foundation for reconciling Git state with the cluster state
- Run Argo CD in production with an emphasis on reliability and troubleshooting
- Bootstrap Kubernetes clusters with essential utilities following the GitOps approach
- Set up a CD pipeline and minimize the failure of deployments
- Explore ways to verify and validate the YAML you put together when working with Kubernetes
- Understand the democratization of GitOps and how the GitOps engine will enable its further adoption
Who this book is for
If you’re a software developer, DevOps engineer, or SRE who is responsible for building CD pipelines for projects running on Kubernetes and wants to advance in your career, this book is for you. Basic knowledge of Kubernetes, Helm, or Kustomize and CD pipelines will help you to get the most out of this book.
Cover Title Page Copyright and Credits Dedicated Foreword Contributors Table of Contents Preface Part 1: The Fundamentals of GitOps and Argo CD Chapter 1: GitOps and Kubernetes Technical requirements What is GitOps? Kubernetes and GitOps Architecture HTTP REST API server Controller manager Imperative and declarative APIs Imperative – direct commands Imperative – with config files Declarative – with config files Declarative – with config folder Building a simple GitOps operator IaC and GitOps Summary Further reading Chapter 2: Getting Started with Argo CD Technical requirements What is Argo CD? Get familiar with Argo CD Core concepts and vocabulary Argo CD reconciliation Vocabulary Explaining architecture Architectural overview The core components of Argo CD The core objects/resources of Argo CD Running Argo CD with Helm locally Running the first Argo CD application Running Argo CD with Argo CD Autopilot locally Synchronization principles Resource hooks Sync waves Summary Further reading Part 2: Argo CD as a Site Reliability Engineer Chapter 3: Operating Argo CD Technical requirements Declarative configuration HA installation with Kustomize Argo CD self-management Configuration updates Setting up an HA installation API server Repository server Application controller Redis cache Dex server Planning for disaster recovery Installing the CLI Creating the backup Restoring on a different cluster Enabling observability Monitoring with Prometheus Metrics for the operating team Metrics for the microservices teams Notifying the end user Installing Argo CD Notifications Starting a pipeline Summary Further reading Chapter 4: Access Control Technical requirements Declarative users Admin and local users Service accounts Local service accounts Project roles and tokens Single sign-on SSO with Dex SSO with Argo CD directly Summary Further reading Part 3: Argo CD in Production Chapter 5: Argo CD Bootstrap K8s Cluster Technical requirements Amazon EKS with Terraform Getting familiar with Amazon EKS Designing EKS infrastructure Provisioning EKS with Terraform Bootstrapping EKS with Argo CD Preparing Argo CD Terraform Applying Argo CD Terraform Using the app of apps pattern Why the app of apps pattern? Bootstrapping utilities Bootstrap in practice Destroying infrastructure Starting fresh infrastructure App of apps disadvantages What is ApplicationSet? Generators Summary Further reading Chapter 6: Designing Argo CD Delivery Pipelines Technical requirements Motivation Simple blue/green in K8s Deployment strategies What is Argo Rollouts? Why Argo Rollouts? The architecture of Argo Rollouts Blue-green deployment strategy Canary deployment strategy A real CI/CD pipeline Setting up Argo Rollouts Automated blue-green promotion with GitHub Actions Automated rolling out with sync phases Keeping secrets safe Storing secrets safely Argo CD and External Secrets Operator Microservices CI/CD Monorepo microservices Summary Further reading Chapter 7: Troubleshooting Argo CD Technical requirements Initial setup Addressing day-to-day issues Restarting components Using a specific version of Helm Improving performance Application controller Repository server Summary Further reading Chapter 8: YAML and Kubernetes Manifests Technical requirements Working with templating options Helm Kustomize Exploring types of validation Validating a Kubernetes schema Enforcing best practices for your manifests Performing extended checks with conftest Summary Further reading Chapter 9: Future and Conclusion Technical requirements Democratizing GitOps What is GitOps Engine? The GitOps agent What is kubernetes-sigs/cli-utils? kapply usage Wrap up Summary Further reading Index Other Books You May Enjoy
How to download source code?
1. Go to:
2. In the Find a repository… box, search the book title:
Argo CD in Practice: The GitOps way of managing cloud-native applications, sometime you may not get the results, please search the main title.
3. Click the book title in the search results.
3. Click Code to download.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.