DOCKER vs KUBERNETES

DOCKER vs KUBERNETES

What is docker?

Docker is a containerization platform. Docker platform can be used to containerize the application in following steps:

  • Create a Dockerfile

  • Create an image out of Dockerfile using "docker build" command

  • Run the image as a container by using "docker run" command.

Difference between docker and kubernetes

  • Docker is a containerization platform and k8s is a container orchestration
    platform.

  • Kubernetes runs as a cluster which makes it efficient.

    Docker does not have a great architecture. (Check out architecture in their official website)

  • Docker containers are run by using command lines as mentioned above whereas kubernetes uses YAML manifest files (configuration files) to run

    container.

  • Docker uses term container whereas k8s creates a pod (which is same as container) but multiple containers can be used inside one pod.

  • Docker uses docker runtime (dockershim) but kubernetes pod can be configured to run on any container runtime (container-d, runC).

  • Docker containers are ephemeral(having short life time) but kubernetes uses

    its components like services, deployments, ingress to perform auto-healing,

    auto-scaling and kubernetes also provides Enterprise level support for managing the containers.

Note:

Building docker images and using it in kubernetes is the best thing you can do to run and manage a container.

Useful information

You can use docker swarm or others as container orchestration platform but kubernetes is the one which is highly used in industries.
Kubernetes is managed by CNCF where people from anywhere in the world can make changes to the code and day by day, kubernetes is heading forward to become a perfect container orchestrator.