Docker vs Kubernetes vs Containerd

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Docker is made up of two main components first of all you have a Docker CLI which is a command line utility that you would use to build and run containers for example to build a Docker image you would create a Docker file and Define steps you may need to add libraries compile your source code into the final executable and perhaps Define some configurations The Next Step would be to run Docker build as a result you get a Docker image in order to store and distribute that image we use Docker Registries it's usually a remote service where you can upload your image and sometimes run some security tests and validations to upload the local image we use Docker push command now the second part of Docker is the docker demon sometimes this is called a client server architecture Docker D is a container runtime it listens to requests from Docker client and manages objects such as images containers networks and volumes for example if you want to to run your Docker image you would use Docker run command this will pull Docker image from the registry and start the container just to clarify the docker image is the read only template that Docker uses to run the container and a container itself is a runnable instance of that image now what if you have multiple applications and you need to manage them at scale at this point you would need to manage your Docker containers on multiple servers to solve this problem in the early days doer created something called doer swarm which is a container orchestration tool it was a great solution that obstructed away a lot of complexity of running containers at scale and was great for simple workloads especially if you're building on premise however these high level abstractions also made it difficult to extend and adapt to your needs kubernetes took a different approach it provides lowlevel constructs to the point where you can even extend the API using CRS so what is kubernetes well it's also a container orchestration platform that allows you to run containers at scale kubernetes consists of the control plane which also includes the etcd database where kubernetes stores all the cluster configuration such as how many containers and where need to be running besides the control plane you have worker Nots where kubernetes actually runs those containers during the early stages of development kubernetes used Docker as a container runtime so you can think of kubernetes as another client of your Docker for example to run application on kubernetes typically you would build Docker image then upload that image to remote repository then you would create one of many kubernetes deployment objects the simplest one used in production is a deployment which is perfect for stateless applications then you would Define how many replicas you want to run Define how much resources you want to allocate to each instance of your application and optionally configure health checks that kubernetes can use to monitor your application to run your application you would use the cubec client and apply yaml configuration then kubernetes will select appropriate nodes and run your application if one of your application instances fail kubernetes will reschedule it on another note the same applies to infrastructure if a kubernetes not fails kubernetes will reschedule your application to ensure the necessary number of replic are running at any given time instead of manually scaling your application up and down you can also Define autoscaling policies and so on I have another detailed video explaining kubernetes architecture and the scheduling process if you're interested kubernetes also allows you to run stateful applications for example if you have a database kubernetes will allocate a volume and attach that volume to the note where database is running now if your database gets rescheduled to another not kubernetes will also detach and reattach the volume so that you don't lose your data kubernetes uses declarative approach for managing containers which means you define the desired State and kubernetes uses its controllers to update the current state this functionality is not only used internally to manage containers but also by some open-source projects to manage external resources for example crossplane is alternative to terraform that uses yaml to create infrastructure the biggest difference is that tra Forum only detects drift when you run it but crossplane continuously monitors the current and desired state for instance if you manually update something from the UI console cross plane will detect it in about 5 minutes and fix the drift now kubernetes use Docker as a container runtime for a very long time however Docker has way more functionality that kubernetes needs doer is a great tool but was initially created for humans to interact with containers kubernetes used something called doer shim to properly integrate doer runtime into kubernetes doer isn't actually one thing it's entire texto and one part of it is thing called container D which is a highlevel container runtime by itself in the recent versions kubernetes duplicated Docker shm and its use of Docker as a container runtime in kubernetes in favor of runtimes that use container runtime interface created for kubernetes now to be clear the most popular container runtime right now is container D which was originally developed by Docker and is still used by Docker itself to run containers it's a smaller and more efficient executable that runs containers on the host it uses fewer resources and allows you to run more containers more efficiently so you would use Docker for local development building and distributing Docker images and you would use kubernetes to run your Docker images at scale
Info
Channel: Anton Putra
Views: 5,694
Rating: undefined out of 5
Keywords: kubernetes tutorial for beginners, kubernetes tutorial, kubernetes, docker, k8s, docker tutorial, docker vs kubernetes, docker vs kubernetes difference, kubernetes vs docker, kubernetes vs docker swarm, devops, anton putra, cloud, terraform, gitops
Id: fJ5w1YGrDdM
Channel Id: undefined
Length: 6min 6sec (366 seconds)
Published: Wed Feb 21 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.