Book Image

Microservices Deployment Cookbook

By : Vikram Murugesan
Book Image

Microservices Deployment Cookbook

By: Vikram Murugesan

Overview of this book

This book will help any team or organization understand, deploy, and manage microservices at scale. It is driven by a sample application, helping you gradually build a complete microservice-based ecosystem. Rather than just focusing on writing a microservice, this book addresses various other microservice-related solutions: deployments, clustering, load balancing, logging, streaming, and monitoring. The initial chapters offer insights into how web and enterprise apps can be migrated to scalable microservices. Moving on, you’ll see how to Dockerize your application so that it is ready to be shipped and deployed. We will look at how to deploy microservices on Mesos and Marathon and will also deploy microservices on Kubernetes. Next, you will implement service discovery and load balancing for your microservices. We’ll also show you how to build asynchronous streaming systems using Kafka Streams and Apache Spark. Finally, we wind up by aggregating your logs in Kafka, creating your own metrics, and monitoring the metrics for the microservice.
Table of Contents (15 chapters)
Microservices Deployment Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Configuring volumes in Kubernetes


Volumes are handled very differently in Kubernetes compared to Apache Mesos. In fact, Kubernetes persistent volumes support Azure, vCloud, and AWS. Kubernetes also supports Ceph, Flocker, Gluster FS, and even Git. This extensive support opens up opportunities for storing your data on the cloud and also enables easy backups.

Note

To take a look at the complete set of supported volumes, go to http://kubernetes.io/docs/user-guide/volumes/#types-of-volumes .

Getting ready

In this recipe, we will learn how to map the volume where our data files are stored in the geolocation microservice.

  1. First, delete any deployments, replication controllers, port forwards, or services that you already have for geolocation. You can leave the echoserver container that we created earlier or delete it. It shouldn't really affect us. Also, always delete the service first and the replication controller afterward. If you try to delete the pod or container, it will be recreated by the replication...