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)

Service Discovery in Kubernetes

Kubernetes manages containerized microservice applications by creating pods. Pods are the building blocks of Kubernetes, where multiple containers are grouped together and share the same network interface. For every pod, Kubernetes assigns an IP that is reachable within the Kubernetes cluster; however, the pods are ephemeral in their nature. In other words, pods and their IPs could change when they are assigned to different nodes. In order to reliably access pods, Kubernetes provides an abstraction layer known as service. Kubernetes services group a logical set of pods that can run on the different nodes inside the cluster and enable other pods to reach them over the service.

Let's imagine having a backend deployment in Kubernetes with two replicas and a frontend deployment with three replicas. To reach the backend pods from the frontend pods, the IPs of the backends should be made available to the frontends, as shown in Figure 5.9. Additionally...