In the past I taught a docker course and within it there is a tutorial that teaches you how to set up
Docker desktop for Windows and Mac.
So I'll just play the tutorial now and once ran from the past is done showing you how to set up Docker
desktop, ran from the present, will take over and show you how to set up a Kubernetes cluster through
Docker Desktop.
Okay, so let's do that now.
Uh, now we're going to install Docker.
So click uh right docker install inside of Google Install the docker engine.
Um.
I'm using a mac.
If you're using a MacBook that has the M1, M2 or M3 chip, whatever.
Uh, click on Docker desktop for Mac with Apple Silicon.
If you're still using a mac with the Intel chip, click on that.
Um, I'm going to click on this one.
I already have Docker installed, but I'll just go through the process with you.
It's actually fairly simple.
So go to my downloads.
Click on the installer.
It should install right away.
It's just going to prompt you to drag this to your applications folder.
All right, um, if I open up the launchpad, I'm going to see Docker right here.
If I click on it, I already have the Docker engine started up and running for you.
It should show a whale icon that's just starting up.
Give it some time to start up.
Okay, once it shows Docker Desktop running, click on sign in slash.
Sign up.
All right.
Um, then I'm going to continue with Google because I already have an account with them.
If you don't have an account, make sure to sign up and then sign back in.
All right.
So I'm going to continue with Google.
It's going to sign me in.
Now I can open Docker.
So this is the Docker dashboard.
And it shows that I'm signed in as are slim 087.
Please do not proceed with this course until you have a Docker account and that you're signed into it
through your local Docker dashboard.
Okay, you can access the dashboard all the same by just clicking on go to dashboard.
Uh, again make sure it shows your username.
Make sure you're logged in once you have that set up.
Uh, this is where all of our containers will show up.
We're going to have visibility to them there.
Well, we're also going to access them through the command line.
But whatever you can also see your image.
All right.
Hey guys.
It's ran from the present.
Um, click on the gear icon in your Docker dashboard.
Okay.
Once you do that go to Kubernetes.
Click Enable Kubernetes, apply and restart okay.
It should take a bit of time.
Not too long.
All right.
Once it stops loading you've enabled Kubernetes.
And what this does is starts a single node cluster when starting Docker desktop.
So I want to distinguish between a single node cluster and a multi node cluster.
A single node cluster means that our personal machine, our laptop or a desktop, whatever you're using
in this case takes up the role of worker node and master node.
But in a production environment what you would do is host a multi node cluster on a cloud provider like
AWS or Azure where you've got many, many worker nodes, many master nodes all working together under
the supervision of the Kubernetes software to achieve container orchestration at scale.
But in this case, because we're just prototyping, we're doing things locally.
We just have a single node cluster where our personal machine is simply running Kubernetes.
All right.
To make sure that everything is working, what I want you to do is actually start by just writing cube
CTL.
All right.
Cube CTL is a command line tool that we use to interact with a Kubernetes cluster.
Which cluster is this cube CTL command line tool interacting with.
You can check that by saying cube CTL config current context.
So our kubectl commands are configured to interact with the Kubernetes cluster that's being hosted locally
by Docker desktop.
All right.
Any kubectl command that we execute is going to go to our local Kubernetes cluster.
And that's pretty much it for setting up Kubernetes.