Today we're talking about something almost everyone is heard of but can't explain Kubernetes.
It's confusing because it solves a problem most people don't see until they hit it.
Everyone knows it matters, but ask what it does and you'll get a blank stare.
It's not a docker replacement or a cloud operating system, though people often guess that.
The confusion makes sense because Kubernetes solves a problem you don't know exists until you face it.
It's a tool that becomes essential once you have more than a handful of containers to manage.
By the end of this episode you'll understand what Kubernetes actually is,
how it fits with containers and why Azure Kubernetes servers makes it practical for teams
that don't want to build everything from scratch.
Grab your coffee and let's dive in.
The problem before containers, let's go back to the problem.
Picture a software company 10 years ago.
You have a few applications to run so you buy servers, install operating systems and deploy everything manually.
Each app gets its own machine and you cannot share resources between them.
If one app needs a lot of memory and another barely uses any,
they each get their own server anyway.
The waste was huge, servers ran at maybe 20% capacity, but you could not consolidate them
because the applications would fight over dependencies.
You ended up with a room full of servers, each barely doing any work,
each consuming power and cooling and all of them needing constant maintenance.
One app needs Python 3.7, another needs Python 3.8,
one needs an older library, another needs the latest.
You cannot run them on the same machine without breaking something so you buy more servers
and pay for hardware that mostly sits idle.
Virtual machines helped a little by letting you slice a physical server into smaller pieces,
each running its own OS, but each VM is heavy with a full OS that takes up disk space and memory
and takes minutes to start.
And you had to configure each one separately, which was a lot of work.
You are still managing all those operating systems, patching, updating and securing them.
Teams needed something lighter and portable,
a way to package an application with everything it needs to run without the overhead of a full virtual machine
and that could be moved easily between machines.
That's where containers came in.
What containers actually are?
A container is a small package that includes your application and everything it needs to run.
That means the code, the runtime, the libraries and the configuration files are all bundled together in one unit.
Think of it like a shipping container for software.
A shipping container can go on a truck, a train or a ship, and the container itself stays the same.
Your software container works the same way.
You build it once and it runs the same on your laptop, your test server, and your production environment.
The key difference between containers and virtual machines is how efficient they are.
A virtual machine runs its own full operating system, so each VM has its own kernel, system files and everything else.
A container shares the host operating system.
It's just a process with its own isolated view of the world.
That means containers start in seconds, not minutes.
They use less memory and you can pack more of them onto a single machine.
Docker made containers popular by giving developers a simple way to build and run them with a single command.
Suddenly, the it works on my machine problems started to disappear.
If your application runs in a container on your laptop, it will run the same way on the server.
The environment is consistent everywhere, but containers solve one problem and create another.
With a handful of containers, manual management works fine.
You can start them, stop them, and keep track of them yourself.
But what happens when you have hundreds of them?
You need to decide which server runs, which container, restart, failed ones, connect them to each other,
and scale them up when traffic spikes.
That's a new challenge and that's exactly where Kubernetes comes in.
The orchestration problem.
So you've got containers working, you package your application, it runs consistently everywhere and life is good.
But only for a while, with 10 or 20 containers you can manage things manually.
You know which server runs, which container you can restart something if it crashes,
and you can update a few things here and there.
It's manageable, but then your application grows.
You move to microservices, so instead of one big application, you have 20 smaller ones.
Each one needs multiple copies running for reliability, and now you're looking at 200 containers.
Manual management doesn't work anymore. You need to decide which server runs each container, restart containers when they fail,
and connect them so they can communicate.
You also need to scale up when traffic spikes, maybe during a sale or a product launch,
and scale back down when things quiet down.
And you need to roll out updates without downtime, which means replacing old containers with new ones one at a time,
carefully, without breaking anything.
These are orchestration problems, and they're exactly what Kubernetes was built to solve.
Kubernetes is an open source platform that automates deploying, scaling, and managing containerized applications.
Think of it as the operating system for your data center, just like Windows or Linux manages the resources on a single computer,
like CPU, memory, and disk, Kubernetes manages the resources across all your servers.
It treats all your machines as one big pool of computing power.
You tell it what you want to run, and it figures out where to put it, how to keep it running, and how to connect it to everything else.
Core concepts, pods, nodes, and clusters.
Let's look at how Kubernetes actually works.
The smallest unit in Kubernetes is called a pod.
A pod wraps one or more containers, containers inside the same pod share storage and networking,
so they can talk to each other over local host.
You can think of a pod as a single unit of deployment.
You don't deploy containers directly in Kubernetes.
You deploy pods.
Pods don't run on their own. They run on nodes.
A node is a server, either physical or virtual.
That's part of your Kubernetes cluster.
Each node runs the software needed to run pods, plus a few other things will get to in a moment.
A cluster is the collection of all nodes, managed as one unified system.
In simple terms, a pod is your application, a node is where it runs, and a cluster is the entire environment.
Pods are ephemeral.
They can be created, destroyed, or moved at any time.
That's by design.
If a node fails, Kubernetes moves the pods to another one.
For scaling up, it creates new pods.
And when a pod crashes, it gets replaced automatically.
The whole system treats pods as temporary.
But if pods come and go, you need a way to talk to them.
Instead of talking to a pod directly, you talk to a service.
A service provides a stable network address that routes traffic to the right pods, even as pods change.
Imagine a hotel. The hotel's phone number is the service.
Rooms change guests all the time, but the phone number stays the same.
You call the front desk, and they root your call to the right room.
That's exactly what a service does in Kubernetes.
It gives you a fixed address that always points to whatever pods are currently running your application.
The control plane, the brain of the cluster.
So you have pods, nodes, and a cluster.
The question is, who decides what runs where?
That's the job of the control plane.
Every Kubernetes cluster has one, and it's the brain of the whole operation.
All the decisions happen here.
The control plane has several components.
The first one is the API server, which access the front door to your cluster.
Every command you send to Kubernetes, whether it's from the command line, a dashboard, or an automated script,
goes through the API server.
It authenticates your request, checks if you're allowed to do what you're asking,
and then passes it along to the right place.
Nothing happens in Kubernetes without first going through the API server.
Next is the scheduler, which decides which node runs each pod.
When you say, "I want this application running," the scheduler looks at all the available nodes,
checks their available resources, like CPU, memory, and disk space,
and picks the best one for the job.
It's like a hotel manager assigning rooms based on what each guest needs.
A guest with a lot of luggage gets a bigger room,
while a lightweight application gets a smaller node with spare capacity, then there's the controller manager.
This component keeps an eye on the cluster,
and makes sure the actual state matches what you declared.
You said you want three copies of your web app running.
The controller manager checks that there are actually three copies running.
If one crashes, it notices and starts a replacement.
If someone accidentally deletes a pod, it creates a new one.
It's the component that keeps your cluster honest.
And finally, there's ETCD, which is the cluster's database.
It stores everything like what's running, where it's running, and how it's configured.
It's the source of truth for the entire cluster.
If the API server is the front door, then ETCD is the filing cabinet in the back office
where all the records are kept.
The beauty of this design is that you describe what you want,
and Kubernetes figures out how to make it real.
You don't tell it how to do things.
You tell it what the end result should look like.
That's the declarative model, and it's the core idea behind everything Kubernetes does.
Workloads, deployments, services, and scaling.
So let's talk about how you actually run applications on Kubernetes.
You won't create pods directly.
Instead, you'll use a higher-level object called a deployment.
Think of a deployment as a manager that tells Kubernetes
how many copies of your pod should run,
which container image to use, and how to update them when a new version comes out.
It's the standard way to run stateless applications.
When you update a deployment, say you push a new version of your app,
Kubernetes performs a rolling update.
It replaces pods one by one, making sure at least one copy is always running.
That means no downtime and no sudden interruption for your users.
And if something goes wrong with the new version,
you can roll back to the previous version with a single command.
That's a powerful safety net, but your pods still need to be reachable.
That's where services come in.
A service provides a stable network address that roots traffic to the right pods.
It can also expose those pods to other parts of your application
or to the outside world.
A service can be internal, only accessible within the cluster,
or external, with a public IP address that users can reach from the internet.
Now here's the thing about scaling.
Kubernetes can automatically grow and shrink your application based on demand.
You set a target, say 70% CPU usage,
and Kubernetes adds more pods when usage goes above that threshold
and removes them when it drops.
Your application scales up during a traffic spike
and scales back down when things quiet down.
No manual intervention needed, but all this power comes with complexity.
Running your own Kubernetes cluster means you're responsible for the control plane,
upgrades, security patches and backups.
You need deep expertise to handle node failures, network configuration, and cluster scaling.
Many teams spend more time managing the cluster than they do building applications.
And that's where managed Kubernetes comes in.
Self-managed version managed Kubernetes.
So let's talk about the reality of running Kubernetes yourself.
When you set up your own cluster, you're responsible for everything.
The control plane upgrades security patches and ETCD backups.
If the API server goes down, that's your problem.
If a security vulnerability is discovered in the version you're running, you need to patch it.
If ETCD gets corrupted, you need to restore from backup.
All of this requires deep expertise.
You need to understand how nodes fail, how networking works at the cluster level
and how to scale things without breaking them.
Here's the thing that surprises a lot of teams.
Many organizations spend more time managing their Kubernetes cluster
than they do building the applications that run on it.
They're constantly fighting with upgrades, troubleshooting networking issues
and dealing with node failures.
The cluster becomes a full-time job.
That's not why you adopted Kubernetes in the first place.
This is where managed Kubernetes services come in.
Services like Azure Kubernetes service or AKS handle the control plane for you.
Azure manages the API server ETCD, the scheduler and the controller manager.
You don't have to worry about patching them or keeping them running.
You just pay for the worker nodes, the virtual machines that actually run your workloads.
The control plane itself is free.
This changes the equation dramatically.
Instead of spending your time on cluster maintenance,
your team can focus on what actually matters.
The application is your building.
For most teams, especially those just starting out,
managed Kubernetes is the right choice.
You get all the power of Kubernetes without the operational overhead.
AKS Kubernetes made simple on Azure.
So what exactly is AKS?
It's Azure's managed Kubernetes service,
giving you a full-featured cluster without building it from scratch.
The control plane is free as we mentioned,
so you only pay for the virtual machines running your workloads.
That means you can start small, pay very little and scale up as your needs grow.
As you are handled all the heavy lifting,
upgrades, patching and health monitoring for the control plane are all taken care of.
You don't need a dedicated team of Kubernetes experts just to keep things running.
And because AKS is part of the Azure ecosystem,
it integrates with tools you're probably already using.
Azure Active Directory for authentication,
Azure Monitor for logging and metrics,
and Azure Policy for Governance.
They all work together out of the box,
no bolting on separate pieces,
setting up CI/CD pipelines with GitHub actions or Azure DevOps takes just minutes.
Push a change to your repository,
and it automatically builds a new container image,
pushes it to Azure Container Registry and updates your deployment on AKS.
No manual steps, no SSH into servers, it's all automated.
For beginners, there's AKS automatic mode,
designed for teams that don't want to make every decision about cluster configuration.
It provides ready to use defaults for scaling, networking, security and upgrades.
You don't have to become a Kubernetes expert to get started.
Just describe your application and AKS handles the rest.
One command gives you a cluster,
one manifest file gets your application running.
The skills you learn on AKS transfer to any Kubernetes environment
because it's standard Kubernetes under the hood.
You're not learning a proprietary system,
you're learning the real thing with Azure handling the operational complexity.
So now you have the big picture,
containers package your applications,
so they run consistently everywhere,
and Kubernetes orchestrates those containers at scale,
handling deployment, scaling and recovery automatically.
AKS makes that orchestration manageable
by taking care of the control plane and integrating with the Azure tools you already know.
The main point is this,
Kubernetes isn't just for big tech companies with massive engineering teams.
With managed services like AKS, it's accessible to any team.
Your homework for this week is simple.
Create a free Azure account,
spin up an AKS cluster and deploy a simple application.
It takes minutes and you'll see how far the platform has come.
Ready to go deeper?
The next episode covers how to build your first container image
and push it to Azure Container Registry.
Subscribe on your favorite podcast platform
and share this with someone who's just starting their Kubernetes journey.