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

Setting up Kubernetes cluster using Docker


We now have a basic understanding of Kubernetes and its components. Though this is sufficient to get started with our recipes, it is strongly recommended that you learn more about Kubernetes from Google's documentation at http://kubernetes.io/docs/ before you start using Kubernetes at scale.

Getting ready

In this recipe, we will orchestrate a local Dockerized Kubernetes cluster.

  1. The easiest way to create a Kubernetes cluster at scale is using Google Cloud Platform at https://cloud.google.com/container-engine . If you have a Google account, you should be able to use Google Cloud Platform right away. But for simplicity, in this recipe, we will be building our Kubernetes cluster on our local machines using Docker.

  2. There are several ways to run a Dockerized Kubernetes cluster, including but not limited to:

    • Building our own Docker Compose file

    • Using kid

    • Using Minikube

  3. Building our own Docker Compose file might take longer compared to using kid and Minikube...