While diving into Docker, Google Cloud and Kubernetes, and without clearly understanding all three of them yet, it seems to me these products are overlapping, yet they\'re not c
Docker Compose is not a production ready tool. It works great for PoC or development environments, but lacks a lot of the capabilities that are more or less table stakes for serious production use. Swarm is more production-ready, but I would never invest into Swarm in a greenfield scenario. Kubernetes has won the orchestration battle, as evidenced by its inclusion into Docker Desktop and it being offered by all major cloud providers. Kubernetes is much more capable and has far more community and corporate support.
I would recommend diving into some of the Kubernetes tutorials available at Pluralsight, Linux Academy, etc. and spinning up a cluster to play around with in your cloud platform of choice (EKS, AKS, GKE, etc.). If you are trying to spin up on bare metal, take a look at OpenShift, but recognize that you lose some of the magic of Kubernetes in this setup.
Docker
Docker is the world’s leading software container platform. It is a tool designed to make it easier to deploy and run applications by using containers.
Please click here! to learn more about docker.
Docker Compose
Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your configuration.
Docker Swarm
Docker swarm is a container orchestration tool, meaning that it allows the user to manage multiple containers deployed across multiple host machines. Docker Compose file is used to deploy multi-container Docker applications.
Kubernetes
Kubernetes is a container orchestration tool developed by Google. Kubernetes' purposes are very similar to that for Docker Swarm. But when we comparing both, the Kubernetes is the best.
Kubernetes vs Docker Swarm!
docker-compose is just a file you maintain which can help you manage containers easily. So at the most bottom level, you have the docker daemon responsible for overseeing individual containers but you will have to pretty much do every manually y issuing commands to the daemon, then you have docker-compose which actually lets you manage various containers together like starting all of them together, killing them or restarting them. you can achieve the same by using a shell script but then it will become very complicated to monitor each container and you will have to write various methods which docker-compose gives you for free.
Kubernetes is just a way to manage the machines on which you install containers PERIOD. Now in Kubernetes the lowest level of unit is a pod and thus abstracting away from you the developer various ops related work whereas using docker swarm you will still have to put an ops hat to maintain the machines running the containers.
If you are networking containers withing the same host go for docker compose.
If you are networking containers across multiple hosts go for kubernetes.
first distinction is between the container engine and the container orchestrator.
docker
is a container engine, it makes you build and run usually no more than one container at most, locally on your PC for development purposes.
docker-compose
is a Docker utility to run multiple containers and let them share volumes and networking via the docker engine features, runs locally to emulate service composition and remotely on clusters.
Kubernetes is a container orchestration platform, it takes care of running containers and enhancing the engine features so that containers can be composed and scaled to serve complex applications (sort of PaaS, managed by you or cloud provider). Main Kubernetes feature is to decouple infrastructure from application using containers, and it's also open for other engines that Docker, for example it can run containers with rkt or cri-o.
Docker cloud is also a PaaS offer that will let you run and orchestrate containers through the docker
engine API.
Now depending on your needs, level of control on infrastructure and target audience you can use either Kubernetes on baremetal, or Azure ACS or Google GKE, etc...
Hope this helped :) Regards
Docker:
Docker Compose
docker run ...
.Docker Swarm
Kubernetes
Docker Cloud
Update:
Docker cloud "partially" discontinued
The services on Docker Cloud that provide application, node, and swarm cluster management will be shutting down on May 21 [2020]... automated builds and registry storage services, will not be affected and will continue to be available