Skip to Content
Keras to Kubernetes
book

Keras to Kubernetes

by Dattaraj Rao
May 2019
Intermediate to advanced content levelIntermediate to advanced
320 pages
8h 51m
English
Wiley
Content preview from Keras to Kubernetes

CHAPTER 8Deploying AI Models as Microservices

In the previous chapter, we talked about Cloud computing, containers, and microservices. We saw how Kubernetes extends beyond a Container‐as‐as‐Service (CaaS) platform into a full ecosystem for deploying software applications packaged as microservices. We also saw an example of deploying an application on Kubernetes by using abstractions like pods, deployments, and services.

In this chapter, we get into some more details of building applications using Kubernetes. We build a simple web application using Python, package it as a Docker container, and deploy to a Kubernetes cluster. Then we modify this application to actually invoke a Deep Learning model and show the results on a web page. Here we start connecting the Keras and Kubernetes worlds together. We see how to build production‐quality Deep Learning applications, thus combining the best of these two technologies.

Building a Simple Microservice with Docker and Kubernetes

Let's get started by building a simple microservice application and then packaging it into a container. The idea of microservices is that the application is self‐contained so it can be deployed and scaled independently as a container instance. First, our application will only show a simple message by reading a text string. We will later do some processing on that text string.

We will use Python to build this web application. Python was traditionally used more for scripting and data science applications. However, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Automated Machine Learning on AWS

Automated Machine Learning on AWS

Trenton Potgieter
Elegant SciPy

Elegant SciPy

Juan Nunez-Iglesias, Stéfan van der Walt, Harriet Dashnow
O'Reilly Strata Data and AI Superstream

O'Reilly Strata Data and AI Superstream

O'Reilly Media, Inc., Shubhankar Jain, Jin Yang, Manasi Vartak, Chris Fregly, Liqun Shao, Kai Wahner, Dave Nielsen, Micah Wylde, Austin Bennett

Publisher Resources

ISBN: 9781119564836Purchase book