Docker and Kubernetes - An Introduction
A ship carrying containers

Docker and Kubernetes - An Introduction

There are two pieces of software that everybody is talking about right now: Docker and Kubernetes.

Docker

Docker is a virtualization software that lets you build composable software parts, called "images", that then run in isolated compartments: "containers".

Imagine wanting a Web Server. Instead of manually installing and configuring Nginx ("Engine-X") in a Virtual Machine, you just tell Docker to download and run a pre-built image, and it is up and running in seconds.?

If you restart the container, it will start up clean again. And when you are done, you just delete the container, and there is no trace of ever having it on your system.

How it works

Docker is virtualization at Operating System level. It runs on top of an existing OS kernel - usually the Linux kernel. The kernel is the lowest level in an operating system which handles the computer's resources. So instead of being virtualized as a full virtual machine, by a software called a hypervisor, each Docker container shares the kernel resources of the host operating system. Each container has its own separate filesystem, and houses their own OS distribution. This allows Docker containers to be lightweight, as opposed to traditional virtual machines.

Linux is not itself an operating system, but a kernel that is being used by multiple Linux distributions - such as Ubuntu and CentOS, which are the actual operating systems, each containing their own set of programs and desktop environments.

Composability

Docker images are layered so you can build your own images with your software on top of existing base images. Use Nginx as a base, and then add the files for your site on top. You've got a new Docker image!

Now you can distribute the image, and others can easily run it without having to install any dependencies except Docker.

The Nginx image is based on an image of the lightweight Alpine Linux distribution. So that is how Docker put software in composable layers.

How it relates to Microservices

You have probably heard of Docker in the context of "microservices". A "microservice" is an independently deployable software service - as opposed to a big service monolith that is published all at once. A microservice might run in a container in Docker, and interact with other containers. The communication is done through HTTP, RPC - or via Asynchronous Messaging through a message queue like RabbitMQ, which also can run in a separate container.

An application that is distributed across multiple separate applications or services (or replicas), such as a microservice, is called a "Distributed application" or a "Distributed system".

Kubernetes

If you want to run containers in a Production environment, then you should consider using Kubernetes:

Kubernetes is a software that orchestrates containers and how they communicate with each other. It enables replication, load-balancing, and it can even restart services in case a container is down. It also provides capabilities for monitoring and controlling how you are exposing services to the outside world.

Conclusion

This was a short introduction to Docker and Kubernetes. I hope that this was useful in understanding these two products.

要查看或添加评论,请登录

Marina Sundstr?m的更多文章

  • The essence of Test-driven development

    The essence of Test-driven development

    The essence of Test-driven development (TDD) is that you think about how to verify (or test) your code when developing…

  • Scaling a Monolith - without Microservices

    Scaling a Monolith - without Microservices

    One myth is that you need to "do" microservices in order to scale your service applications horizontally. This has…

  • Microservices - What are they?

    Microservices - What are they?

    Microservices is a hot topic in software development nowadays. Everybody wants to do it, but what is the point of it?…

  • The political call for rationing

    The political call for rationing

    This week it was reported that the Swedish Prime Minister Stefan L?fvén had been talking to the Swedish retailer ICA…

    1 条评论
  • Defending the profit motive

    Defending the profit motive

    Profits are essential to the entrepreneurial process. Money represents the economic activity.

  • Why do we need prices?

    Why do we need prices?

    Yet another article in the series on competition, monopolies and patents. Prices are everywhere, so they must mean…

  • Do we need patents?

    Do we need patents?

    This is the continuation of my series on competition and monopolies. Now, we are going to talk about ownership and…

  • Should we fear "monopolies"?

    Should we fear "monopolies"?

    What is fair competition? What happens when a big company dominates a certain industry? This is a continuation of my…

  • Why do we need competition?

    Why do we need competition?

    This is my first article on LinkedIn. Let us de-mystify economic competition.

    4 条评论

社区洞察

其他会员也浏览了