We wrote this book for builders. Whether you are a developer, DevOps engineer, site reliability engineer (SRE), or platform engineer dealing with Kubernetes, you are building some good stuff. We would like to share our experience from what we have learned in the field and in the community about the latest Kubernetes automation insights for pipelines and CI/CD workloads. The book contains a comprehensive list of the most popular available software and tools in the Kubernetes and cloud native ecosystem for this purpose. We aim to provide a list of practical recipes that might help your daily job or are worth exploring further. We are not sticking to a particular technology or project for implementing Kubernetes automation. However, we are opinionated on some of our choices to deliver a concise GitOps pathway.
The book is organized in sequential chapters, from the basics to advanced topics in the Kubernetes ecosystem, following the GitOps principles. We hope you’ll find these recipes valuable and inspiring for your projects!
Chapter 1 is an introduction to GitOps principles and why they are continuously becoming more common and essential for any new IT project.
Chapter 2 covers the installation requirements to run these recipes in a Kubernetes cluster. Concepts and tools like Git, Container Registry, Container Runtime, and Kubernetes are necessary for this journey.
Chapter 3 walks you through a complete overview of containers and why they are essential for application development and deployment today. Kubernetes is a container-orchestration platform; however, it doesn’t build containers out of the box. Therefore, we’ll provide a list of practical recipes for making container apps with the most popular tools available in the cloud native community.
Chapter 4 gives you an overview of Kustomize, a popular tool for managing Kubernetes resources. Kustomize is interoperable, and you find it often used within CI/CD pipelines.
Chapter 5 explores Helm, a trendy tool to package applications in Kubernetes. Helm is also a templating system that you can use to deploy apps in CI/CD workloads.
Chapter 6 walks you through cloud native CI/CD systems for Kubernetes. It gives a comprehensive list of recipes for the continuous integration part with Tekton, the Kubernetes-native CI/CD system. Additionally, it also covers other tools such as Drone and GitHub Actions.
Chapter 7 kicks off the pure GitOps part of the book as it sticks to the Continuous Deployment phase with Argo CD, a popular GitOps tool for Kubernetes.
Chapter 8 goes into the advanced topics for GitOps with Argo CD, such as secrets management, progressive application delivery, and multicluster deployments. This concludes the most common use cases and architectures you will likely work with today and tomorrow following the GitOps approach.
The following typographical conventions are used in this book:
Indicates new terms, URLs, email addresses, filenames, and file extensions.
Constant width
Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords.
Constant width bold
Shows commands or other text that should be typed literally by the user.
Constant width italic
Shows text that should be replaced with user-supplied values or by values determined by context.
This element signifies a tip or suggestion.
This element signifies a general note.
This element indicates a warning or caution.
Supplemental material (code examples, exercises, etc.) is available for download at https://github.com/gitops-cookbook.
If you have a technical question or a problem using the code examples, please send email to [email protected].
This book is here to help you get your job done. In general, if example code is offered with this book, you may use it in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product’s documentation does require permission.
We appreciate, but generally do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: “GitOps Cookbook by Natale Vinto and Alex Soto Bueno (O’Reilly). Copyright 2023 Natale Vinto and Alex Soto Bueno, 978-1-492-09747-1.”
If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at [email protected].
For more than 40 years, O’Reilly Media has provided technology and business training, knowledge, and insight to help companies succeed.
Our unique network of experts and innovators share their knowledge and expertise through books, articles, and our online learning platform. O’Reilly’s online learning platform gives you on-demand access to live training courses, in-depth learning paths, interactive coding environments, and a vast collection of text and video from O’Reilly and 200+ other publishers. For more information, visit http://oreilly.com.
Please address comments and questions concerning this book to the publisher:
We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at https://oreil.ly/gitops-cookbook.
Email [email protected] to comment or ask technical questions about this book.
For news and information about our books and courses, visit https://oreilly.com.
Find us on LinkedIn: https://linkedin.com/company/oreilly-media.
Follow us on Twitter: https://twitter.com/oreillymedia.
Watch us on YouTube: https://youtube.com/oreillymedia.
We both want to thank our tech reviewers Peter Miron and Andy Block for their accurate review that helped us improve the reading experience with this book. Thanks also to the people at O’Reilly who helped us during the whole writing cycle. Many thanks to our colleagues Aubrey Muhlac and Colleen Lobner for the great support with publishing this book. Thanks to Kamesh Sampath and all the people who helped us during the early release phases with comments and suggestions that we added to the book—your input is much appreciated!
During these challenging times, I’d like to acknowledge Santa (aquest any sí), Uri (don’t stop the music), Guiri (un ciclista), Gavina, Gabi (thanks for the support), and Edgar and Ester (life is good especially on Friday); my friends Edson, Sebi (the best fellow traveler), Burr (I learned a lot from you), Kamesh, and all the Red Hat developers team, we are the best.
Jonathan Vila, Abel Salgado, and Jordi Sola for the fantastic conversations about Java and Kubernetes.
Last but certainly not least, I’d like to acknowledge Anna for being here; my parents Mili and Ramon for buying my first computer; my daughters Ada and Alexandra, “sou les ninetes dels meus ulls.”
Special thanks to Alessia for the patience and motivation that helped me while writing this book. And to my parents for everything they made for me, grazie mamma e papà, you are the best!
3.12.152.194