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)

Exposed Metrics in Kubernetes

Kubernetes provides many out-of-the-box metrics that can be collected by Prometheus. For this, Kubernetes' system has a service called kube-state-metrics (, which listens to the Kubernetes API server and produces metrics to inform you about the current status of the objects. These metrics provide information on the current health status of the cluster nodes and the other Kubernetes resources, such as pods and services. Some of the key metrics are explained here:

  • kube_pod_info: This provides detailed information about the pods, such as the pod name, namespace, and the node name that the pod is running on.
  • kube_pod_status_ready: This enables you to check whether the pod is in Ready status.
  • kube_pod_container_status_running: This enables you to check whether the container has a Running status.
  • kube_node_status_condition: This provides information about the current condition of the...