- [Instructor] Let's install Kubernetes on all the required
components on a Windows machine.
As you can tell, in this scenario,
I'm installing this on Windows 10 Enterprise edition.
However, you can also do this on Windows 10 Pro.
The first pre-requirement we need is Docker.
Let's go to the products tab and go to Docker Desktop.
There's a product offering,
and you can see that you can get the download for Windows.
Go ahead and do that.
I already actually have it installed,
and you can see that in Docker,
desktop is up and running in the little task bar.
And in this scenario, I have
Docker Desktop for Community edition,
version 2.2.05. channel stable.
Let's make sure that I'm actually running this
on the command line.
So open up PowerShell.
Run as the administrator.
Let's do a Docker PS
and then a Docker version.
So you can tell I'm running client version 19.03.8
and the server version, also 19.03.
Clear out of here.
So we have Docker for our desktop and that's great.
The second thing we need is kubectl.
I'm going to install and set up kubectl.
Let's do this for Windows,
be lazy and click the link.
Let's save it off to the downloads folder
and actually what I'm going to do here,
is I'm going to copy this to a different folder;
C drive kube.
Copy this over.
And the next thing I need to do is make sure
that the path is all correct.
So I can go to environment variables,
and I'm actually going to edit my path here.
And I'm going to add the C drive kube folder.
So browse this PC,
C drive kube,
and it gets dropped at the very end.
I'm actually going to elevate this a couple,
to make sure that it's before anything Docker specific,
so that if Docker also installs kubectl,
then I know that it's the version that I actually want
to run versus what is dictated by Docker
or Docker for Desktop.
Hit OK.
So now let's go ahead to PowerShell.
Open this,
run as administrator,
and I can do kubectl version, minus minus client.
We notice here that this is major one, minor 18,
and this corresponds with the latest release
of 1.18 from this link.
So they correspond, which is great,
that's what we're expecting.
So next up, we want to do the same thing for Minikube.
So install Minikube
and we have a, before we begin section.
So we need to make sure that we have a hypervisor
up and running.
I had mentioned before that,
you need Windows, at least Windows 10 Pro
or Windows 10 enterprise.
This probably won't work well without work arounds
in Windows home,
so keep that in mind.
So let's verify.
System info,
clear my screen.
So we notice here that from the hyper V requirements,
a hypervisor has been detected, which is good.
Features required for hyper V will not be displayed.
So we're good to go over there.
If you scroll down, we can actually install Minikube.
So for Windows, the very first time you do this,
you might need to actually enable it.
So they have a link to install the hypervisor Hyper V.
And if you're running this from PowerShell,
you want to run this command,
which basically enables the Windows optional feature
of online for the Microsoft hypervisor, Hyper V.
Let's copy the command.
So let's run that, clear this.
Once that runs, we notice that it's online of true,
which looks good.
All right, we can go back and install Minikube.
You can use Chocolate Install,
but I'm just going to do the direct download.
Minikube Windows, and64.
Save that.
Once again,
We'll use the same strategy here
where we drop this into the kube folder.
I'm going to rename this to just Minikube.
The next thing we need to do is to also make sure
that from a networking perspective,
Minikube can actually access the internet.
So in order to do that, I'm going to go to
the Hyper V manager,
and I'm going to create a virtual switch for this.
So, the virtual switch manager
and under default network,
actually, I'm going to create a new virtual switch.
Let's call this internal,
and we'll be very creative and just call this Minikube,
internal network.
Hit OK.
And I wanted to go to the network and sharing,
in control panel.
And underneath network, under public network
for access type internet, you would probably have
an ethernet zero, or you might have a wifi.
So I'm going to go into that properties,
under sharing, I'm going to allow other network users
to connect through this computer's internet connection.
And in this list, I'm going to pick Minikube
so that the connection can be shared
Hit OK,
let's close that.
And now finally,
I can go back to my terminal
and I can actually start up Minikube.
So I'm going to type; Minikube start.
I'm going to pass my VM driver,
of Hyper V
and I'm going to also pass my switch.
Hyper V virtual switch equals Minikube.
This is what we just set up
and that's the driver also that we just set up.
So let's run that.
The very first time you run this, it might take a while.
Behind the scenes, it's actually going to provision you
a VM, so it's going to create all the virtual resources,
et cetera, that's required.
Great.
As we can see here, it's prepared Kubenetes 1.18.
on Docker, 19.03,
and keeps details not configured to use Minikube.
So let's test it out.
Kubectl, get nodes.
So we notice here that we have
node name Minikube which is ready and it's been online
for 30 seconds.
And with that, we have kubectl Minikube running on Windows,
and we can move on to our first Hello World.