Reader small image

You're reading from  Kubernetes for Developers

Product typeBook
Published inApr 2018
Reading LevelIntermediate
PublisherPackt
ISBN-139781788834759
Edition1st Edition
Languages
Right arrow
Author (1)
Joseph Heck
Joseph Heck
author image
Joseph Heck

Joseph Heck has broad development and management experience across start-ups and large companies. He has architected, developed, and deployed a wide variety of solutions, ranging from mobile and desktop applications to cloud-based distributed systems. He builds and directs teams and mentors individuals to improve the way they build, validate, deploy, and run software. He also works extensively with and in open source, collaborating across many projects, including Kubernetes.
Read more about Joseph Heck

Right arrow

Example – Python/Flask container image


To walk through the details of how to use Kubernetes, I have created two sample applications that you can download, or replicate to follow along and try out these commands. The first of these is a very simple Python application using the Flask library. The sample application is directly from the Flask documentation (http://flask.pocoo.org/docs/0.12/).

You can download a copy of this code from GitHub at https://github.com/kubernetes-for-developers/kfd-flask/tree/first_container. Since we will evolve these files, the code referenced here is available at the first_container tag. If you want to use Git to get these files, you can run the following commands:

git clone https://github.com/kubernetes-for-developers/kfd-flask

Then, go into the repository and check out the tag: 

cd kfd-flask
git checkout tags/first_container

Let's start with looking at the contents of a Dockerfile, which define what gets built into a container and how that happens.

The goals we have...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Kubernetes for Developers
Published in: Apr 2018Publisher: PacktISBN-13: 9781788834759

Author (1)

author image
Joseph Heck

Joseph Heck has broad development and management experience across start-ups and large companies. He has architected, developed, and deployed a wide variety of solutions, ranging from mobile and desktop applications to cloud-based distributed systems. He builds and directs teams and mentors individuals to improve the way they build, validate, deploy, and run software. He also works extensively with and in open source, collaborating across many projects, including Kubernetes.
Read more about Joseph Heck