GitOps Cookbook. Kubernetes Automation in Practice

GitOps Cookbook. Kubernetes Automation in Practice

GitOps Cookbook. Kubernetes Automation in Practice

Автор: Alex Soto Bueno , Natale Vinto
Дата выхода: 2023
Издательство: O’Reilly Media, Inc.
Количество страниц: 244
Размер файла: 8,5 МБ
Тип файла: PDF
Добавил: codelibs
 Проверить на вирусы

Foreword ix
Preface xi
1. Introduction 1
1.1 What Is GitOps? 1
1.2 Why GitOps? 2
1.3 Kubernetes CI/CD 3
1.4 App Deployment with GitOps on Kubernetes 4
1.5 DevOps and Agility 5
2. Requirements 7
2.1 Registering for a Container Registry 7
2.2 Registering for a Git Repository 9
2.3 Creating a Local Kubernetes Cluster 12
3. Containers 17
3.1 Building a Container Using Docker 18
3.2 Building a Container Using Dockerless Jib 23
3.3 Building a Container Using Buildah 27
3.4 Building a Container with Buildpacks 32
3.5 Building a Container Using Shipwright and kaniko in Kubernetes 35
3.6 Final Thoughts 42
4. Kustomize 43
4.1 Using Kustomize to Deploy Kubernetes Resources 44
4.2 Updating the Container Image in Kustomize 50
4.3 Updating Any Kubernetes Field in Kustomize 52
4.4 Deploying to Multiple Environments 57
4.5 Generating ConfigMaps in Kustomize 60
4.6 Final Thoughts 66
5. Helm 67
5.1 Creating a Helm Project 68
5.2 Reusing Statements Between Templates 75
5.3 Updating a Container Image in Helm 79
5.4 Packaging and Distributing a Helm Chart 82
5.5 Deploying a Chart from a Repository 84
5.6 Deploying a Chart with a Dependency 88
5.7 Triggering a Rolling Update Automatically 93
5.8 Final Thoughts 98
6. Cloud Native CI/CD 99
6.1 Install Tekton 100
6.2 Create a Hello World Task 107
6.3 Create a Task to Compile and Package an App from Git 108
6.4 Create a Task to Compile and Package an App from Private Git 114
6.5 Containerize an Application Using a Tekton Task and Buildah 117
6.6 Deploy an Application to Kubernetes Using a Tekton Task 122
6.7 Create a Tekton Pipeline to Build and Deploy an App to Kubernetes 125
6.8 Using Tekton Triggers to Compile and Package an Application Automatically When a Change Occurs on Git 135
6.9 Update a Kubernetes Resource Using Kustomize and Push the Change to Git 139
6.10 Update a Kubernetes Resource Using Helm and Create a Pull Request 144
6.11 Use Drone to Create a Pipeline for Kubernetes 148
6.12 Use GitHub Actions for CI 150
7. Argo CD 155
7.1 Deploy an Application Using Argo CD 156
7.2 Automatic Synchronization 162
7.3 Kustomize Integration 166
7.4 Helm Integration 168
7.5 Image Updater 171
7.6 Deploy from a Private Git Repository 178
7.7 Order Kubernetes Manifests 182
7.8 Define Synchronization Windows 187
8. Advanced Topics 191
8.1 Encrypt Sensitive Data (Sealed Secrets) 192
8.2 Encrypt Secrets with ArgoCD (ArgoCD + HashiCorp Vault + External Secret) 195
8.3 Trigger the Deployment of an Application Automatically (Argo CD Webhooks) 198
8.4 Deploy to Multiple Clusters 200
8.5 Deploy a Pull Request to a Cluster 206
8.6 Use Advanced Deployment Techniques 208
Index 217

 Why are so many companies adopting GitOps for their DevOps and cloud native strategy? This reliable framework is quickly becoming the standard method for deploying apps to Kubernetes. With this practical, developer-oriented book, DevOps engineers, developers, IT architects, and SREs will learn the most useful recipes and examples for following GitOps practices.

 Through their years of experience in application modernization, CI/CD, and automation, authors Alex Soto Bueno and Natale Vinto from Red Hat walk you through all the steps necessary for successful hands-on application development and deployment with GitOps. Once you start using the recipes in this book, you'll have a head start in development cycles on Kubernetes following the GitOps approach.

You'll learn how to:

  • Develop and deploy applications on Kubernetes
  • Understand the basics of CI/CD and automation on Kubernetes, and apply GitOps practices to
  • implement development cycles on the platform
  • Prepare the app for deployment on multiple environments and/or multiple Kubernetes clusters
  • Deploy apps for either multiple environments using GitOps and Argo CD, or for Kubernetes clusters
  • Create Kubernetes-native pipelines with Tekton
  • Provide and extend DevOps skills for the team working on Kubernetes
  • Use progressive delivery to put your applications into production

Похожее: