Kubernetes Getting Started on Windows for beginners

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Laughter] what is that people and welcome to another video in this video we'll be taking a look at kubernetes specifically on docker for windows so what we'll be taking a look at as is the prerequisites how to install configure some of the issues you may find them on the way and how to solve them and we'll also take a look at configuring the cluster for first time use so without further ado let's go alright so the first thing we're going to do is take a look at a number of things you're going to need to install in order to get started so the first thing you're going to want to make sure is that hyper-v is enabled if you already have hyper-v enabled that's the hypervisor for Windows you can skip this step but to enable it you're gonna click on the start bar you're gonna search for the control panel once the control panel comes up you're gonna go to programs go to turn Windows Features on and off and you will see a list like this pop up and what you're going to look for is the hyper-v sectioning you want to take all these boxes turn them on and press apply and ok if you cannot turn it on from here you also need to make sure that you have turned it on in the BIOS on your machine if it's disabled some laptops come shipped with the hyper-v turned off by default so you won't be able to turn it on unless you boot into the BIOS and turn it on over there and then yet you just come here turn it on and you're good to go so the main reason why you need hyper-v enabled is because docker for Windows as well as the kubernetes offering is are basically linux technologies so the whole software package will run a Linux virtual machine behind the scenes for you so the next thing you're going to need is docker for Windows so go ahead over to Google search for docker for Windows and you'll see on the link to the docker website so getting started with docker for Windows once you go into there you will see a bunch of instructions the main one is to the installation so you're going to want to go ahead and click on that that'll go through the to the installation page where you can download from docker hub once you go onto that link it'll ask you to login so in order to use docker you need to create a docker hub account so go ahead and create one sign in once you've signed in you can follow the remaining steps to download the installer and once you've started installation things will get rolling so once docker is installed see you right at the bottom here you open up the system tray you'll see a little whale icon that'll give you the status of docker you can right click this here you can restart it pretty quickly if there's any problems you can head over to settings on the setting menu there's a bunch of things that are quite interesting the main ones are the shared drive you're gonna want to go ahead and share your drive so that you can do docker volume mounts and here's a basic example of how to run an alpine container and just see what is inside of the volume to make sure that the container can actually see what's what you're mounting in so you can mount files to the container now to install kubernetes it's really really simple all you do is head over to the kubernetes setting and enable it so you just press this tick box and you say apply that'll give you a little prompt to say it may take a few minutes it also requires internet connection because what this will do is download all the cluster components I think it will it might use the same docker machine or run a separate doctor machine on the hypervisor so let's go ahead and install that you can now see the status of it here in the bottom left corner you can see docker is up and running kubernetes is starting so it's creating another machine in the background ooh so we've successfully installed kubernetes [Music] okay so now what we're going to want to do is head over to Google type cube CTL download and search for kubernetes cube CTL you'll see this install and setup documentation will come up and this is the guide for how to install cube CTL cube CTL is the command-line utility used to operate and manage and basically work with kubernetes the installation instructions are pretty straightforward there's a section for windows right here there's a link also that you can click which will give you the latest version of cube CTL so just go ahead and click that that'll start the download so you can download this binary or this exe file and put it anywhere in your machine wherever you want I've put it under C created a folder called cube CTL and you can see it's in there cube c TL DX e and the next thing you're gonna want to do is head over to the control panel and just search for environ you'll see environment variables come up for the system now you can do two things you can either set it up for your account or you can set it up for the whole system so anyone that logs anything use it so I just set it up for the whole system I click on that it'll take me through to the environment variables section and yeah I can either do set up the path for just my user account or for the entire operating system so what you want to want to do is pick one of them and then expand them and you'll see all these paths here notice that I've created a new one so you can hit over click the new button and you can start typing in a path I've added here one called C slash cube CTL so that now tells the system that whenever I type cube CTL it's gonna know where to find that exe so if once once you've added an entry into your path variable you want to make sure you restart your PowerShell window if you have one open or ready because otherwise it won't load the path variables you need to have a fresh one open and what you want to go ahead and do is just type cube CTL and you'll see automatically it'll print out the help commands for cube CTL that means you've configured your command line to nowhere cube CTL is so cube CTL has the ability to two faced with multiple kubernetes clusters and it does this through a config now this cube CTL will be pointing to a kubernetes config somewhere in your system when you've installed docker for Windows and you enabled kubernetes it will create an entry for you now to see that entry what I want you to do is type cube CTL config and then type current context that'll give you the current context of what is configured for cube CTL so it's docker for desktop so whatever I do whatever commands I run with cube CTL will be run against my kubernetes cluster on docker for desktop you can have multiple contexts added so you can have your development environment your staging environment your production environment all configured within that cube config and we will dive into cube CTL and the cube config in a future video but for now you can see we were able to configure our cube CTL and we're ready to start working on our docker for Windows environment so to see whether the environment is up and running what I want to do is say cube CTL get nodes and you'll see we have one node that's one machine called docker desktop and it's running so I can also say cube CTL get pods and we see there's nothing deployed in this cluster and I will go over all of these concepts in a future video in a whole series we'll break it down keep the videos short and informative but what we've done here is we've created a kubernetes cluster and whatever we do with this cluster is going to be the same as your production environment and that's the beauty of our kubernetes as it abstracts away the machines so whether it's a docker machine running here on our on our Windows environment or whether it's machine in the cloud it doesn't matter so the way we talk to kubernetes is going to be the same way between your local you'll develop an environment and your production environment all right so it's literally that simple installing docker on windows installing cube CTL and making sure your cluster is up and running so that's it for this video guys stay tuned for the next video we'll be taking a look at how to configure cube CTL in a lot more details we'll be taking a look at how to become efficient with the command line using all the different commands that cube CTL provides us and so that we can basically operate kubernetes locally as well as in production and then we'll also take a look at all the different objects how to deploy to kubernetes how to enable services in Gray's configurations secret management and all of these great things so until next time peace [Music]
Info
Channel: That DevOps Guy
Views: 45,041
Rating: 4.9288702 out of 5
Keywords: getting, started, kubernetes, windows, docker, guide
Id: 8h4FoWK7tIA
Channel Id: undefined
Length: 9min 11sec (551 seconds)
Published: Fri Sep 06 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.