I have been fortunate enough to work in Devops for the past few years. During this time, I have taken an obsession in learning how to manage applications in production, and as a result trying to figure out:

Containers

One the latest technologies to revolutionize the way servers are managed are containers. Simply put, a container is an abstraction that packages code and dependencies together thus providing isolation from the surrounding environment. In addition to the code, it specifies the runtime, system tools, system libraries and settings required. As a result a container can provide isolation that can mitigate against unexpected mutability and resource over utilization. There are different flavours of containers, but the focus will be on Docker.

Container technology by itself, is but just one piece of the puzzle. However, there also needs to be a mechanism to deploy, scale and manage containerized applications in production i.e. container orchestration.

There are several container orchestration tools which include Docker swarm, Kubernetes and Mesos. Out of the major players in the market, Kubernetes has emerged to be the most popular orchestration tool, gaining quite a lot of traction and adoption in the last couple of years.

Kubernetes

Kubernetes is an open source container orchestration tool based on the Google Borg cluster manager that is used to manage the Google platform.

At it’s elementary level, Kubernetes can schedule and run application containers on clusters of physical and virtual machines. It means that:

The foundational concept of Kubernetes is in the management of pods. A pod is one or more containers deployed together as a group within the same physical or virtual host machine colloquially known as a node. For example, a pod could have one container that hosts the application code and a separate container that handles the application monitoring and logging. Majority of what Kubernetes does is in:

Working with Django.

This blog series focuses on Django, which is one of the most popular python frameworks and is been used by companies like Bitbucket, Eventbrite, Instagram, Pinterest etc. As such, it forms a good candidate in figuring out how to deploy it in production using Kubernetes. Knowledge of Django is useful but not entirely necessary as the underlying ideas can be applied to other frameworks as well.

The code for this tutorial can be found in Github where each post is a specific branch in the repo.

Tutorial steps

The tutorial series progresses with increased complexity, where in:

Summary

It’s quite an ambitious project, but hopefully at the end we will know more about Kubernetes than when we first began.

If you like this post, don’t forget to like and/or recommend it. You can find me on Twitter as @MarkGituma.

Credits