Book Image

Introduction to DevOps with Kubernetes

By : Onur Yılmaz, Süleyman Akba≈ü
Book Image

Introduction to DevOps with Kubernetes

By: Onur Yılmaz, Süleyman Akba≈ü

Overview of this book

Kubernetes and DevOps are the two pillars that can keep your business at the top by ensuring high performance of your IT infrastructure. Introduction to DevOps with Kubernetes will help you develop the skills you need to improve your DevOps with the power of Kubernetes. The book begins with an overview of Kubernetes primitives and DevOps concepts. You'll understand how Kubernetes can assist you with overcoming a wide range of real-world operation challenges. You will get to grips with creating and upgrading a cluster, and then learn how to deploy, update, and scale an application on Kubernetes. As you advance through the chapters, you’ll be able to monitor an application by setting up a pod failure alert on Prometheus. The book will also guide you in configuring Alertmanager to send alerts to the Slack channel and trace down a problem on the application using kubectl commands. By the end of this book, you’ll be able to manage the lifecycle of simple to complex applications on Kubernetes with confidence.
Table of Contents (11 chapters)

Updating an Application in Kubernetes

Updates are handled differently for different resources in Kubernetes. Since deployments are used for stateless applications, they need to be managed differently from StatefulSets, which are used for stateful applications. In this section, we will explore how updates can be handled in StatefulSets and deployments.

StatefulSet Update Strategies

In StatefulSets, an update strategy can be configured using the updateStrategy field in the resource definition. It can be set to the two following values: OnDelete and RollingUpdate.

OnDelete

When the OnDelete option is used, the Kubernetes controller does not automatically update the StatefulSet's pods. You must first delete the pods in order for the update process to take place. This is particularly useful for performing checks to verify whether the new version works correctly. However, in this way, an update is entirely a manual process that takes a lot of time and cannot be used in...