Hey, so if you're new to the world of cloud native development and Kubernetes,
you've probably wondered to yourself, you know,
what's the difference between containers and pods?
Well, hi, my name is Cedric Clyburn.
I'm a developer advocate at Red Hat,
and I'm here to explain the differences between these two technologies
and help you learn more in your journey of Kubernetes.
Now, what are containers?
Well containers are a fascinating technology
that allow us to package up an application
such as a web app, a database, an API,
whatever it might be, along with its code,
its runtime and its libraries.
So essentially, everything that this application needs to run in an
isolated environment is packaged up in this one singular unit.
And this is known as what's called a "container image".
So we take this container image and we can now
deploy this to a variety of different locations,
such as maybe a production server or our colleague's
computer for him to test out the application.
And it provides this standard that is super important in today's
development world for transporting applications and deploying them.
Now, I'm sure you know about what a VM is, but what's the difference
between containerization technology?
Well, they're both using virtualization, of course,
but while a VM is including the application, the library
and the operating system, which can be pretty bulky at times,
the container is only including the application and the libraries,
but not the underlying operating system.
It uses the host's operating system as well as its kernel
and its resources in order to run the application.
So in in effect, it's much more lightweight and efficient
and it allows us to iterate a lot faster when we're developing applications
in the modern age.
Now, containers, they're amazing, but what containers really allow us to do
is to create microservice- based applications
using this amazing tool called Kubernetes.
Now, Kubernetes is the defacto standard for orchestration
of these containerized applications.
So they allow us to automate, to manage, and to scale up
perhaps one, perhaps 100, perhaps a 1000 or more
of these containerized applications in order to form one whole application.
It's a very popular technology.
And, and actually last year, as part of the "State of Enterprise 2022"
report at Red Hat, we took a survey and found that 70% of IT
leaders are using Kubernetes within their organizations.
So it's a hugely popular and adopted technology
for being able to manage containers, and it's awesome.
But what are Kubernetes pods now?
You've probably heard of it before, but a pod is the smallest
deployable unit that goes within Kubernetes.
So a pod allows us to take containers and deploy them on our cluster
by taking essentially one or more of these containers and packaging it up.
So we're able to share networking within these containers.
We're able to share ports within this grouping.
We're even able to share things like volumes
so that they can share, you know, different storage.
But of course, since they are containers,
they still have isolation because they're file systems.
Now, if we take a look at a pod example, let's say
that we have a Python application that's serving web content, right?
So this has been containerized, of course, and we also have another container
which is logging or pushing data from this Python application somewhere.
Now to deploy them into Kubernetes, since they are closely-related processes,
we can simply put them all within a container.
And this allows them to be able to talk to each other on local host,
which is pretty neat.
So this is effectively the best way to be able to deploy these applications
to allow them to talk together closely and to, with Kubernetes,
manage them. So we can manage things like memory, the CPU usage.
And when we have a lot of traffic coming to our application, let's say
we're getting a lot of demand.
Maybe people love our site and they're just coming to visit it.
So what Kubernetes will be doing is actually
instantiating new pods up in the cluster.
So it's connecting these, using something, that's known a service,
for load balancing.
And so almost instantaneously, we can
bring up new pods and we can also bring down the pods.
So Kubernetes is the way to be able to work with containers by using pods.
So they correlate together like that.
Now, it's a fascinating technology, and if you'd like to get your hands on
and get some practical experience with Kubernetes, I recommend
you try out something like minikube, which allows you to spin up
a local Kubernetes cluster on your development machine,
and then you can take what you've done and deploy
that to a cloud provider of your choice with their Kubernetes offering.
Thanks so much for watching!
Remember to smash that like button and subscribe to the channel for more tech based content.