Apr 04, 2018 | 2 min read

Docker and Kubernetes: A Force for Deploying Microservice Applications

By: Zachary Sersland

Docker and Kubernetes: A Force for Deploying Microservice Applications

When microservice architecture is discussed, Docker and Kubernetes are often a central part of the discussion - and with good reason. When used together, they make it convenient to build and manage an application with a microservice architecture. Since both tools are often used in combination with each other, it’s easy to think they’re one in the same. But each one has an important, yet separate, role in turning applications into self-contained modules that minimize the probability and impact of deployment errors.

Understanding Containers

Before defining either one, it’s important to understand the concept of containers and why they ensure your application deployment will never fail. Containers are very well named – they contain your software and all its dependencies. This means you won’t have any surprises when a container moves from one environment to another. This containment makes process isolation and deployment automation possible.

Docker

Docker is a tool for creating, deploying, and running applications using containers. Docker uses the (less-than-creatively named) Dockerfiles to define a build process. Building a Dockerfile creates an image that can be run as a container. Some of the advantages Docker provides are:

  • Continuous deployment and testing – Docker ensures consistent environments from development to production
  • Portability – Containers can be run in all major Cloud platforms
  • Version control – Docker allows you to commit changes to your Docker images with version control, making it easy to roll back to previous versions
  • Isolation – Docker ensures each container has its own resources isolated from other containers
  • Security – Isolation ensures that no container can look into processes running inside another container. Therefore, if one container is hacked, others can’t be affected.

All these advantages combine to allow for rapid, easy deployments without having to refactor your entire build process with each change. However, this strength can be a weakness in the wrong hands, and developers can find themselves in an unmanageable “application jungle” of containers.

Kubernetes

This is where Kubernetes comes in. Kubernetes is like the single conductor to an orchestra of Docker containers. It allows an architect to answer several questions regarding their Docker containers, including:

  • How will the Docker containers talk to each other?
  • How will the containers scale with increased demand?
  • What happens when a container fails?
  • How will load balancing work between containers?

Additionally, Kubernetes has a few handy benefits, such as Pods, that provide a system for integrating modular parts and Kubernetes Controllers, which deploy and update software at scale.

Together, Docker and Kubernetes create an ideal environment for deploying microservice applications to the cloud. When your goal is to launch your application more reliably and scale your software faster, Docker and Kubernetes are a vital part of your DevOps toolkit. If you still have more questions or would like someone to assess your current environment, contact DragonSpears.

About Zachary Sersland

Zachary Sersland is a senior developer and team lead at DragonSpears. He earned his degree in computer science from Northwestern University and has been working in software development and consulting ever since. His focus is primarily in .Net and AWS, but he’s also taken on projects using Azure, PHP, and even Python. His favorite aspects of working at DragonSpears are the company’s development of leaders at every level and the opportunity to work with such talented teammates. He’s a movie fan, having seen every movie on the AFI and BFI Top 100 Films lists, and in high school, he earned money as a church organist.