we as humans like to always compare things we compare apples to oranges we
compare who is a better footballer Messi or Ronaldo we compared mostly to Ferrari
and whatnot in today's IT world the trending
comparison is Kubernetes versus docker which is in fact an apples to oranges
type of a comparison and what you should rather compare is Kuberentes versus
docker swarm because these two compete on a level playing field on that note
let me get started today my name is Vardhan and I'll be representing edureka
in this video and as you can see these will be the parameters I'll be
comparing these two tools against installation and cluster configuration
GUI scalability auto scaling load balancing updates and rollbacks data
volumes and finally logging and monitoring ok now before I get started
with the difference let me just go back a little bit and give a brief about
Kubernetes and Docker swarm ok now first of all Kubernetes and Docker swarm
are both container orchestration tools orchestration is basically needed
when you have multiple containers in production and you will have to manage
each of these containers and that's why you need these tools ok cuban at ease
was first fault created by Google okay and then they donated the whole project
to the cloud native computing foundation and yeah now it's a part of the CNC F
open source project ok and since Kubernetes was Google's brainchild it has a
huge developer community and a lot of people who are contributing to Kuberenetes
so if you have any errors at any point of time when you're working with
Kubernetes then you can straight away put that error on github.com or Stack
Overflow and you will definitely have solutions to those errors so that's the
thing about Kuberenetes and we consider Kubernetes to be more
preferable for a complex architecture because that's when the whole power of
Kubernetes comes out so kubernetes is really strong
ok if you're gonna use a very simple architecture maybe an application which
has very few services and which needs very few containers then you're not
going to really see the power of kubernetes when you have like hundreds of
thousands of containers and prod that's when cuban at ease is actually
beneficial and that's where you see the difference between cuban at ease and
office walk right so doc a swarm the other hand is not that good when you
have to deal with hundreds of containers okay so functionality where they are
pretty much head-to-head with each other okay so with both you can set up your
cluster but yeah docker swarm is a little easier and it's
more preferable when you have less number of containers okay but whatever
it is if you are dealing with broad environment then Kuban at ease is your
solution because cuba Nadi's will ensure your cluster strength in prod a little
more at least when you compare it to Dhaka swamp okay and yeah the Dhaka
swarm community is unfortunately not as big as the Cuban at ease because Google
is basically bigger than Dhaka and Bacchus WOM is again owned by and made
in by da kurung so that is the deal with cuban at ease and dogs form all right
but never mind the fact that the base continues which are used for these are
again docker containers so at the end of the day docker is definitely going to be
a part of cuban at ease and as part of the Orcas form it's just what you do
after your containers that's what matters the container management part ok
so anyway I have given you a good brief about these two tools ok now let's get
down to the functional differences between these two let's start with
installation and clustered configuration now for setting up your cluster with
cuban at ease it's going to be really challenging in the beginning because you
will have to set up multiple things you'll have to first bring up your
cluster then you have to set up the storage volume for your cluster and then
you have to set up your environment and then you have to bring up your dashboard
you have to bring up your pod network and when you bring up your dashboard you
have to do the cluster rule binding and all these things ok and then finally you
can get your node to join your cluster ok but with Dhaka swamp it's pretty
simple and straightforward you need to run one command to bring up the cluster
and one command add the node end for it to join the cluster and two simple
commands and your classes running you can straight away get started with
deploying ok so this is where cuban at ease falls
short it's a little more complicated but it's worth the effort because the
classes strengths that you get with cuban at ease is way more stronger than
docker swamp ok so when it comes to failure
mechanisms and to recovery in such places cuban at ease is little faster
and in fact cuban antes will give you more security compared to docker swamp
because because your containers are more likely to filled with swarm dynamic
cuban at ease so it's not like i'm saying that your containers will
definitely fail but if at all they fail then there are more chances of your
containers feeling at swamp than with cuban at ease okay so
that's about the class of strength and if you are really important about your
Pradhan vironment and if you have a business which is basically running over
these containers then I would say your preference should be Cuban at ease
because at the end of the day business and your containers running in prod are
more important so the cluster is more important and that's why cuban at ease
now moving on to the next parameter we have GUI now cuban at ease wins over
here also because cuban at ease provides a dashboard over which we can basically
control or cluster no it is controlled we can also figure out and get know what
is the status of your cluster and how many pods are running in your class stop
how many deployments are there how many containers are running how many services
are running and which are your nodes you will have all these details in a very
simple fashion okay so it's not like you don't get all these things with Dockers
form okay you get it with docker swarm also but you don't have a GUI over here
there is one dashboard where you can visually see everything so you can use
the CLI with docker swarm and you can use the CLI with kubernetes also but
it's just that cuban andes provides you a dashboard which is a little better and
to our eyes it's a little more easier to understand when you see graphs when you
see your deployments would say you're all your deployments 100% healthy when
you see something like that you will relate to it a lot more and you will
like it a lot more so that this additional functionality which you get
with cuban at ease okay so that's where cuban on uses or wins over here and i
also want to add another point that with your cuban andes dashboard you can
easily scale up your containers and it can also control your deployments and
make new deployments in a very simple fashion
so even non-technical people can use cuban at ease okay but i mean if you are
a non-technical person then what are you doing with containers right so that's
what veterans would say so seasoned developers would say that i mean if
you're not technical enough to deal with containers then you don't deserve to be
here so that is one point which can defend office warm but it does not
change the fact that cuban at ease makes our life easier now moving on to the
third one which is a scalability both cuban at ease and dhaka swamp are
very good for scaling up okay so that is the whole point of for these tools when
we say orchestration this is the biggest benefit okay cuban at ease can scale up
very fast swamp can also scale up very fast but there's a saying that swamp is
five times faster than cuban at ease when it comes to scaling up that is the
point so I think swarmed is not just Cuban at
ease over here to victory right but yeah whatever it is it's scaling up that's
what matters since both into it we're in good so the next point is auto-scaling
now if I was a Salesman then I would use this whole point of auto scaling as my
sales pitch biggest auto scaling is all about intelligence right with cuban at
ease your cuban Ares will always be analyzing your server traffic and
whenever there's a sudden increase in your traffic your cuban aunties will
automatically scale up your number of containers okay and then when the
traffic reduces then automatically your raw number of containers will also be
scaled down okay so there's no manual intervention
whatsoever i don't need to barge in so if there's a weekend coming up and if i
am pretty sure that my website is gonna get a lot of traffic over the weekend
over the saturday and sunday then i don't have to manually configure
my deployments for the weekend cuba Nadi's will automatically do that for me
and with docker swarm that is a major drawback because you cannot do auto
scaling you will have to do it manually okay you can do scaling it's not that
scaling is a big deal but during emergency situations it's really
important okay Cuba ladies will automatically analyze that okay you're
getting a lot of traffic today and it will automatically scale it up for you
okay but swamp is a little different and if there's an emergency and if your
containers are running out of the number of services which they can request then
they cannot do anything I mean worst case scenario they will just die out
okay so this is where Cuban at ease wins during these emergency situations
because auto scaling is not possible with dock a swamp now moving on to my
next point which is load balancing okay now with Cuban at ease at times you will
have to manually configure these or load balancing options okay with docker swarm
you don't need to do that because it's automatically done now the reason you
should do it with cuban at ease is because in cuban at ease you will have
multiple nodes and inside each node you will have multiple pods right and inside
these pods you will have many containers now if your service is basically
spanning over multiple containers running in different pods then there's
this concept of load balancing which you have to manually configure because pods
can let all the containers inside them to talk to each other okay but when it
comes to managing your load between these pods that's where the challenge
comes especially when these pods are on different nodes okay so you will face
times when you will have to manually configure these load-balancing and you
will have small issues okay but it's wrong that it's gonna be major you can
still deal with it but swamp widget because you have no concept of pods over
here you have a swarm cluster in which there are containers so these containers
can be easily discovered by others okay so they use IP addresses and they can
easily just discover each other and you're all good so that's the point and
now coming to the sixth point which is ruling updates and rollbacks let's say
that these two are very important aspects and these are some of the best
features of these two tools okay now rolling updates is basically needed
for any application now be a software application which is using cuban at ease
or not whether it's using docker swarm or not any application needs updates ok
so rolling updates is really important because any application would need to
have updates to it right any software application any web application it
definitely needs updates to its functionality ok now if your application
is basically containerized then at any point of time you don't need to bring
down your containers and then make the updates with the help of using these
containers the different containers and these ports can be progressively given
the updates ok so in cuban at ease we have the concept of pods and inside the
pods we have multiple containers right so in cuba nati is what happens is these
rolling updates are gradually sent to each of these pods as a whole so all the
containers inside the pods will be gradually given these rolling updates ok
with docker swarm you have the same thing but it's little different because
you don't have pods the ruling updates are gradually sent to all the containers
one after the other that's the only difference
ok you're rolling out dates are gradually sent to different containers
and kubernetes and and akka swamp but in cuban at ease its to all the containers
within the same pod ok ruining updates sent one after the other to the
different continuous in the same pod that's the point and when it comes to
roll backs again both provide the same thing ok you can roll back your changes
so if your master at any point of time figures out that you're rolling a bit is
going to fail then you have an option of rollback you actually have the
functionality in both cuban at ease and and aqus form but the point is there is
no automatic rollback in case of your cuban indies cluster or if your master
finds out that the update is going to fail then it will automatically roll
back to the previously stable condition but
with swamp the swamp manager will not automatically do it I mean it provides
optionality to rollback but it's not automatic that is the only difference
between these two so I think over here also kubernetes slightly beats dhaka
swamp okay just nudges ahead of it and now coming to the seventh point which is
nothing but data volumes no data volumes is a very key concept because you can
have a shared volume space for different containers okay
now the concept chill difference between these two is that in cuban at ease you
have multiple pods and only containers inside that one particular pod can have
a shared volume okay and the difference with cue docker swarm is that since
there are no pods pretty much any container can share the shared space
with other containers so that is the only difference okay so I don't think I
would go ahead and rate these two exist a functionality and a conceptual
difference between these two tools okay now moving on to the last point logging
and monitoring so with cuban at ease you have inbuilt tools which does the
logging for you and also the monitoring happens okay
so there's a particular directory where you can go and you can read your logs
and you can find out where your errors are where your deployment failed why
something happened you can get all those details because it automatically does
the logging and the monitoring part is used by your master to basically analyze
what's your cluster status at all the times what is the status of all your
nodes what is the status of the different pods in the nodes are all the
containers up and running are countenance responsive so humanities
uses monitoring for all these purposes okay
but with dhaka swamp there's no inbuilt tool and you have to use third-party
tools something like aniele key right so I've done that before and I've set up LK
to work with my daugher swamp and it pretty much does the same thing okay so
with L key you can collect all the logs you can figure out where the error is
and even monitoring can be done but it's just that the L key is again not a very
easy tool to set up and use that extra step which you have to do with respect
to Dhaka swamp okay so I think that's pretty much the end of the
functionalities and the conceptual differences between these two tools to
Pilates and Dhaka swamp now that is the end of the theory part over here I'm
going to open up for docker swamp and Cuban Andes and show you a demonstration
and give you a feel as to how they work okay so for that let me open up my VMs
where or these two are installed let me start the demo with docker swarm first
so can everybody see my VM over here so I have about two virtual machines I have
a master and I have a slave but when it comes to docker swarm they are not
called master and slave but they are rather called manager and worker
so my manager is the manager of the cluster and my worker would be the one
that will be executing the services all right so like I said with your dhaka
swami it's very easy to bring up the cluster and the command to do that is
very simple you can just specify docker swarm in it
advertised a door and just specify the IP address of your master okay
so in my case my master or my managers IP address is this one okay so if I just
hit enter then everything's up and ready I get the joining token and if I just
execute this command at my node end then my cluster would be ready and I would be
joining my cluster okay so I'm gonna copy this let me go to my vaca and here
let me paste this if I hit enter then it says that this node has joined the swarm
as a worker brilliant right so that's as quick as it is and with your master you
got this message saying to add a manager to the swarm you should use this other
command okay but that's only if you want another node to join as a master or as a
manager but otherwise this command is good enough so your cluster has been
initialized and in just a few seconds right so it's as simple as that if you
want to deploy an application you can go ahead and straightaway do that let me
show you a simple application let me run a hello world and show you I can use the
command docker service create and let me give the name as hello world okay and
they image to be used as the hello world image okay so I will basically get a
container having the name of a hello world and that would be created and it
could be both it could be running in both the manager and on my node but if I
want one replica offer that running in both my manager and my node then I can
set then there's another flag I can use to set that okay and that is the mode
flag I can say mode is equal to global so with this I will have one container
running on my manager end and one container in my node and this is where
the difference is with respect to Q bilities because in Kuban at ease only
your nodes will run the services your manager or your master will not execute
any service okay it'll only manage the whole deployment
okay so that was a spelling mistake in my command so let me just go here and
say service okay so let's just wait for a few
seconds until my container is up and running great so as you can see my
service has been created and this is my ID if I want to verify my cluster state
and to check if my services is already I can run these commands I can do a docker
node PS okay in this way I'll know how many continuous came up and on which
nodes they were executed so it says on my manager there were four of these that
started okay and of course it's a hello world container so it's basically shut
down immediately and I can do a docker node LS to identify how many members are
there in my cluster so with this you can see that there are IDs for two different
nodes one is my worker and the other is my manager right and that's how simple
it is with docker but with kubernetes it's a little more different okay so I
think by now if you got a good idea of how simple docker swarm is okay and
besides I can also check the service status by running a few commands right
so I have a docker service LS so this would basically list down the containers
which are there and the services ok so it says I have a hello world container
which is running and it's in replicated mode and there is one replica of this
particular container right so I can also track mode I can do a docker service PS
and I can say the name I can say hello world and happy Rios about my container
right so initially there was one container which started off in my worker
and then it got shut down and then one more on my worker and then a couple of
them on my manager so these are the details and this is how you drill down
right so you specify that I need one particular service that is the hello
world service and I need this many replicas wherein I want them running on
my manager and my worker and then the container has been deployed and it's
running and that's what you can see here right so that is about docker swamp and
let me bring the VM down and bring up my cuban ladies VMs to show you a
demonstration of cuban Eddie's ok well I hope the concept was clear you
but in case if we have any doubt then I would request you to go to enter a cos
YouTube channel and watch my video and docker swarm where I've shown load
balancing between the different nodes and I've also shown how to ensure high
availability okay so in the meanwhile let me just shut this down to bring down
the cluster I can basically get my notes to leave the cluster first and then shut
down the class of itself so if I want to bring down my cluster I can do it with a
simple command but before I do that let me stop the service which I created
okay so docker service RM and the hello world was the name so I'm gonna stop the
service and now there are not going to be any replicas of this service or this
container okay now let me go back to my node and here let me leave the cluster
the swarm cluster okay and the simple command for that is docker swamp leave
so if I hit this command at the node end then this node will leave the swarm okay
so if i run the docker node LS command over here then the entry you for my node
will be gone it would have only one entry that is my manager okay but
anyways if i want to bring the password to an end then i can get you know my
manager to leave the cluster and i can execute the same command for that I can
say docker swarm leave and everything's back so yeah let me use force okay known
as left so that's a bit darker swamp okay let me just close this terminal and
go to my next demo so now let me open up my Williams which
have the Cuban and he is running okay so this is my Cuban Andes master and this
is my Cuban at ease note okay now the thing is that I'm not showing
you the entire setup over here because it's really complicated alright so I
don't want to go ahead and execute all the ten fifteen commands and show you
the entire process setup because it's gonna take a lot of time to do that
rather if you want to know how to do the your classes setup with Cuban at ease
then you can go and now see the blog which I've written and also there's
another video on how to setup the Cuban Aires cluster alright so these two would
do you of any help the YouTube video and the blog and the link to both of them
are below in the description okay so let me just straight away get started and
tell you what I have already done if I have wanted to set up the cluster then
there are a lot of things which I should have done okay starting from here so
basically I have started my init command over here I've specified which pod
network I am using I'm going to use a calculator work stuff specify that and
now specify the address where the other nodes are to subscribe okay and then
there are various commands which I have to run with respect to setting on the
environment okay these and then I basically set up the calcio padova here
and then have made room for setting up the dashboard and then have brought my
proxy up okay yeah and then from the second terminal I've done few more
things I have brought off my dashboard account so I have created a service
account from ie or dashboard and then I've done the cluster old binding by
saying that this dashboard that I'm the admin and give me the admin privileges
so I've done that here and then have basically obtained the key which is
basically the authentication key for accessing the dashboard so these are the
so many other commands which are needed to be executed from the masters end
before your node joins and then after that I basically went to my node and
then I executed the one command which I was asked to execute okay so this was
the join command I generated at my master so I took that and I pasted it
here and then my node successfully has joined the cluster so this was the
entire process and you can go to my blog and to my how we use and go through this
whole process okay so I have also brought up the dashboard right so let me
just straight away go to the dashboard and show you how simple it is how easy
to make any deployment because that is the whole advantage with your dashboard
right talk--i swamp maybe easier that's what I showed you with Cuban at ease
it's much more better and this is the Cuban IDs dashboard that comes up it
comes up on this port number alright and if you want to start your deployment
it's very very simple okay you can just go to this create button over here click
on create and then you have option you can either write your JSON script or you
can upload the JSON file which have already written or you can click on this
create an app over here it's basically a click functionality and here you can
just put in your app name so let's say I want to deploy the same hello world app
so I'll just put the hello Alec of the name over here hello world and then the
base main which I want to use for this is gonna be the hello world image is
going to be present in my daugher hub registry or the Google registry so hello
world is the image and let's say i want three pods initially okay and let me
just straight away click deploy okay and with that your application is deployed
and similarly if there's anything else you want to continue eyes it's as simple
if it's going to be an engine server or a tomcat
or an apache server which you want to deploy you can just choose the base
image and hit on the deploy button and yes it's straight deployed and you'll
get something like this which would show what is the overview and what is the
status of your cluster ok as you can see my deployments my pods and replica sets
everything is a healthy 100 percent right so this is my deployments so it
says that 2 or of 3 pods are running so let's just give it a few minutes and
then all the three pods will be up and running ok you gotta give it a few
seconds because it's just 19 seconds old and yeah these are the 3 pods the third
one is coming up ok because yeah it says terminated because the hello world
container it's a self destruct container right it prints hello world and exists
that's what happens here same thing with the replica sets I've mentioned two or
three pods which means that at all times there will be three pods running and my
replica sets and replication controller is the one that will control this pass
pet ok so yeah that is pretty much it and that's how easy and simple it is to
work with cuban at ease right so you can have your own opinion you can choose
whether you want to use cuban at ease or you can choose if you want to use dogs
form okay so my take on this is if you have a very simple application
then you would rather be better off with docker swamp okay and also if you have
very few clusters which you are dealing with but if you're dealing with a real
pro environment then I would say kubernetes is a better option and also
when the containers are many number when you have a lot of containers then it's
easier to work with cuban energies you can just specify the configurations you
can say that I need these many currently not running at all the times and eat
these many nodes which are connected to my cluster and I he will have these many
pods running in these nodes and whatever you say that will be followed by your
cuban at ease so that is why cuban at ease is better in my opinion and you can
have your own version so whatever your choice is between the two i would like
to listen to your opinion you can please put in your opinion in the comment box
and if you have any doubts you can let me know all right so before I end this
video I would like to talk about the market share between cuban at ease and
Dorcas warm when it comes to new articles or blogs written on these two
tools then in cuban andes beats docker swamp 9 is to one for every nine blogs
written on cuban at ease is one written on dhaka swamp so that is the difference
you're 90% just a 10% same thing with the depth searches right so cuban at
ease has you know vamo searches 90% more searches as compared to Dhaka swamps 10%
search and same thing you can say for publications github stars and for your
get up comets okay so Cuban Arnie's pretty much wins on every term here and
it's way more popular and it's way more used and it's probably more comfortable
and if you have any problem at any point of time you have a huge community which
will help you out with all the replies right of whatever your error is so if
you want simplicity I would say go for docker swarm but if you want plus a
strength and if you want to ensure high availability in your Prada specially
then Cuban Andes is your tool to go for but however both are equally good and
they are pretty much neck to neck on all the grounds and this was a statistic
which I picked up from platform 9 which is a very famous or tech company right
so they write about that so I think on that note I would like to conclude
today's session and I'd like to thank you for watching the video to the very
end do let us know one more topics too modest to make more videos and it would
be a pleasure for us to do the same and with that I'd like to take my leave
thank and happy learning
I hope you have enjoyed listening to this video please be kind enough to like
it and you can comment any of your doubts and queries and we will reply
them at the earliest do look out for more videos in our playlist and
subscribe to any rekha channel to learn more happy learning
Không có nhận xét nào:
Đăng nhận xét