﻿{"id":1821,"date":"2023-02-08T21:20:11","date_gmt":"2023-02-08T15:50:11","guid":{"rendered":"https:\/\/blogs.infosys.com\/digital-experience\/?p=1821"},"modified":"2023-02-15T12:31:37","modified_gmt":"2023-02-15T07:01:37","slug":"kubernets-vs-docker","status":"publish","type":"post","link":"https:\/\/blogs.infosys.com\/digital-experience\/micro-services-cloud\/kubernets-vs-docker.html","title":{"rendered":"Kubernets vs Docker"},"content":{"rendered":"<p><em>Kubernetes vs Docker<\/em><\/p>\n<p>There are many reasons why people come to use containers and container APIs like Kubernetes, but we believe they can all be traced back to one of these benefits:<\/p>\n<p>1.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Velocity<\/p>\n<p>2.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Scaling (of both software and teams)<\/p>\n<p>3.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Abstracting your infrastructure<\/p>\n<p>4.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Efficiency<\/p>\n<p>Kubernetes also provides a concrete economic benefit to the abstraction. Applications can be accumulated on the same machines without impacting the applications themselves. This means that tasks from multiple users can be packed tightly onto fewer machines.<\/p>\n<p>Docker runs on each of the worker nodes and runs the configured pods. It takes care of downloading the images and starting the containers.<\/p>\n<p>Docker will manage the production and deployment of each application container; Kubernetes manages multiple containers in clusters across platforms.<\/p>\n<p>Docker and Kubernetes both have the same functionality, but they handle the issues in different ways.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Why Kubernetes?<\/strong><\/p>\n<p>1.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Kubernetes has Flexibility for orchestrating a large cluster of distributed containers.<\/p>\n<p>2.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Kubernetes provide resource-efficient deployment along with synchronization.<\/p>\n<p>3.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Capability to scale and manage of multiple container applications.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Kubernetes Features<\/strong> -:<\/p>\n<p><strong>Installation<\/strong><br \/>\nKubernetes installed manually, and the process would be different based on the provider as well as the operating system.<\/p>\n<p>Docker is installed with the use of a one-line command (install docker-engine -y) in Linux.<\/p>\n<p>Scalability<br \/>\nKubernetes works with its built-in horizontal auto scaling feature.<\/p>\n<p>It adjusted node Dynamically when load increases.<\/p>\n<p>Docker does not have any feature for auto scaling, but Docker Swarm has a feature of scalability that could be handled automatically.<\/p>\n<p><strong>Availability<\/strong><br \/>\nKubernetes has high availability of services along with its most significant self-healing and intelligent scheduling features.<\/p>\n<p>Docker does not have any capability like this, But Docker Swarm can do in different way.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Load Balancing<\/strong><br \/>\nKubernetes provides functionality equivalent to type equals ClusterIP to pods within the cluster and extends it by programming the (external to Kubernetes) load balancer with entries for the Kubernetes pods.<\/p>\n<p>Docker is internal load balancing, according to the assigned DNS names, the requests are delivered to the balancer. The load is distributed among the internal and external load balancers.<\/p>\n<p><strong>Kubernetes architecture based on cluster<\/strong>.<\/p>\n<p>1.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Set of nodes.<\/p>\n<p>2.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 physical Machine<\/p>\n<p>3.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 virtual machines.<\/p>\n<p>For achieving High availability, to avoid interruption more than one master nodes work in cluster.<br \/>\nThe system is composed of a master node and any number of worker nodes. When the developer submits a list of apps to the master, Kubernetes deploys them to the cluster of worker nodes.<\/p>\n<p><strong>Master Node and Working Node<\/strong><br \/>\nIn worker node Pods are smallest unit which helps to run Containerize application.<\/p>\n<p>A pod of containers allows you to run closely related processes together and provide them with (almost) the same environment as if they were all running in a single container, while keeping them somewhat isolated. This way, you get the best of both worlds. You can take advantage of all the features containers provide, while at the same time giving the processes the illusion of running together.<\/p>\n<p>COMPONENTS RUNNING ON THE WORKER NODES The task of running your containers is up to the components running on each worker node:<\/p>\n<p>1.\u00a0\u00a0\u00a0 The Kubelet<\/p>\n<p>2.\u00a0\u00a0\u00a0 The Kubernetes Service Proxy (kube-proxy)<\/p>\n<p>3.\u00a0\u00a0\u00a0 The Container Runtime (Docker, rkt, or others)<\/p>\n<p>Docker uses a client-server model architecture with key component.<\/p>\n<p>1.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Docker Client<\/p>\n<p>2.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Docker Host<\/p>\n<p>3.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Network and Storage components<\/p>\n<p>4.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 and the Docker Registry \/ Hub<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Docker Key Feature<\/strong><\/p>\n<p>1.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Faster and easier configuration.<\/p>\n<p>2.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Application isolation.<\/p>\n<p>3.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Increase in productivity.<\/p>\n<p>4.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Swarm.<\/p>\n<p>5.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Services.<\/p>\n<p>6.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Routing Mesh.<\/p>\n<p>7.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Security Management.<\/p>\n<p>8.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Rapid scaling of Systems.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Docker and Kubernetes Work Together?<\/strong><\/p>\n<p>Docker and Kubernetes work together very smoothly and complement each other.<\/p>\n<p>Docker and Kubernetes technologies help us run more scalable and robust applications.<\/p>\n<p>Docker use for packaging and shipping the app and create containers<\/p>\n<p>Kubernetes allows us to manage containers create by docker \u00a0\u00a0at runtime.<\/p>\n<p>Docker and Kubernetes develop and run applications in well-structured way.<\/p>\n<p><strong>Conclusion<\/strong><\/p>\n<p>This comparison blog, helps to understand the basic difference between Kubernetes and Docker. Architecture and key features for both technology are explained. The blog also covers how Kubernetes and Docker help each other in the application development process.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Kubernetes vs Docker There are many reasons why people come to use containers and [&hellip;]<\/p>\n","protected":false},"author":350,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[3],"tags":[187],"coauthors":[179],"class_list":["post-1821","post","type-post","status-publish","format-standard","hentry","category-micro-services-cloud","tag-kubernets-and-docker"],"acf":[],"_links":{"self":[{"href":"https:\/\/blogs.infosys.com\/digital-experience\/wp-json\/wp\/v2\/posts\/1821","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.infosys.com\/digital-experience\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.infosys.com\/digital-experience\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.infosys.com\/digital-experience\/wp-json\/wp\/v2\/users\/350"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.infosys.com\/digital-experience\/wp-json\/wp\/v2\/comments?post=1821"}],"version-history":[{"count":5,"href":"https:\/\/blogs.infosys.com\/digital-experience\/wp-json\/wp\/v2\/posts\/1821\/revisions"}],"predecessor-version":[{"id":1863,"href":"https:\/\/blogs.infosys.com\/digital-experience\/wp-json\/wp\/v2\/posts\/1821\/revisions\/1863"}],"wp:attachment":[{"href":"https:\/\/blogs.infosys.com\/digital-experience\/wp-json\/wp\/v2\/media?parent=1821"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.infosys.com\/digital-experience\/wp-json\/wp\/v2\/categories?post=1821"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.infosys.com\/digital-experience\/wp-json\/wp\/v2\/tags?post=1821"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blogs.infosys.com\/digital-experience\/wp-json\/wp\/v2\/coauthors?post=1821"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}