Nedzad G
Nedzad G

Reputation: 1037

Kubernetes vs. Docker: What Does It Really Mean?

I know that Docker and Kubernetes aren’t direct competitors. Docker is the container platform and containers are coordinated and scheduled by Kubernetes, which is a tool.

What does it really mean and how can I deploy my app on Docker for Azure ?

Upvotes: 19

Views: 7957

Answers (4)

Batman Rises
Batman Rises

Reputation: 766

Consider a scenario where we have multiple docker containers interacting with each other. enter image description here

Now suppose a container crashes. Admin will need to rectify it immediately and restore the container to previous state. Suppose if there are less number of containers then this approach is fine. But if we have hundred of thousands of containers running, then monitoring them manually is not feasible. So it is difficult to monitor the container cluster 24/7.
This is why we need Kubernetes. Kubernetes also called as K8s is an open-source container-orchestration system for automating deployment, scaling and management of containerized applications.
Kubernetes does not allow containers to run on their own. Instead containers run inside a construct called Pods. We can have multiple containers running inside a pod. This makes Pods the fundamental building block in Kubernetes. Multiple containers running inside a pod is usually not a common occurrence. Usually there is a single container running in a pod. enter image description here

Reposted from my blog Need for Kubernetes

Upvotes: 0

Heyman
Heyman

Reputation: 539

Docker and Kubernetes are complementary. Docker provides an open standard for packaging and distributing containerized applications, while Kubernetes provides for the orchestration and management of distributed, containerized applications created with Docker. In other words, Kubernetes provides the infrastructure needed to deploy and run applications built with Docker.

Upvotes: 3

tgogos
tgogos

Reputation: 25122

Short answer:

  • Docker (and containers in general) solve the problem of packaging an application and its dependencies. This makes it easy to ship and run everywhere.

  • Kubernetes is one layer of abstraction above containers. It is a distributed system that controls/manages containers.

My advice: because the landscape is huge... start learning and putting the pieces of the puzzle together by following a course. Below I have added some information from the:

Why do we need Kubernetes (and other orchestrators) above containers?

In the quality assurance (QA) environments, we can get away with running containers on a single host to develop and test applications. However, when we go to production, we do not have the same liberty, as we need to ensure that our applications:

  • Are fault-tolerant
  • Can scale, and do this on-demand
  • Use resources optimally
  • Can discover other applications automatically, and communicate with each other
  • Are accessible from the external world
  • Can update/rollback without any downtime.

Container orchestrators are the tools which group hosts together to form a cluster, and help us fulfill the requirements mentioned above.


Nowadays, there are many container orchestrators available, such as:

  • Docker Swarm: Docker Swarm is a container orchestrator provided by Docker, Inc. It is part of Docker Engine.
  • Kubernetes: Kubernetes was started by Google, but now, it is a part of the Cloud Native Computing Foundation project.
  • Mesos Marathon: Marathon is one of the frameworks to run containers at scale on Apache Mesos.
  • Amazon ECS: Amazon EC2 Container Service (ECS) is a hosted service provided by AWS to run Docker containers at scale on its infrastructrue.
  • Hashicorp Nomad: Nomad is the container orchestrator provided by HashiCorp.

Upvotes: 35

Bhumi Shah
Bhumi Shah

Reputation: 9466

Kubernetes is built on Docker technology. It is an orchestration tool for Docker container whereas Docker is a technology to create and deploy containers.

Docker, starting with a platform-as-a-service (PaaS) provider named dotCloud.

All in all, Kubernetes is related to the Docker container, allowing you to implement application portability and extensibility in container orchestration.

DOCKER Easy and fast to install and configure Functionality is provided and limited by the Docker API Quick container deployment and scaling even in very large clusters Automated internal load balancing through any node in the cluster Simple shared local volumes

Kubernetes Require some work to get up and running Client, API and YAML definitions are unique to Kubernetes Provides strong guarantees to cluster states at the expense of speed To Enable load balancing requires manual service configuration Volumes shared within pods

This is just a basic idea which at least explains the difference.If you want to go in depth see my posts

http://www.thecreativedev.com/an-introduction-to-kubernetes/

http://www.thecreativedev.com/learn-docker-works/

Upvotes: 0

Related Questions