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)

Activity 7: Running a Persistent Database on Kubernetes

Imagine that you work on a microservice that is responsible for the payments on an e-commerce website. You are required to deploy a database management system. The data kept in this database needs to stay secure for a long time, especially for legal and audit purposes. Data loss could mean catastrophe for the company. Your task is to deploy a MySQL relational database management system (because of the high number of transactions in this microservice) with a volume that won't be cleaned up if the pod crashes or is removed.

Note 

To complete this activity, you can use Minikube or a managed Kubernetes cluster such as GKE.

Execute the following steps to complete this activity:

  1. Create a Deployment definition file for MySQL, which uses a secret for the user password and a Volume using a PVC.
  2. Create a service definition file for your deployment.
  3. Generate a password and deploy a secret using the password...