Kubernetes Installation On Windows

Kubernetes Installation On Windows


First install Kubectl on Windows:

  • Open CMD in windows in administrative mode.
  • If you have curl installed, then run this command in CMD...
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.18.0/bin/windows/amd64/kubectl.exe

  • If you are getting some error, then download this manually and copy in a particular location on your laptop.
C:\Users\gaurav\  

  • The next step is, add binary in your path.

For adding path:

  1. Search for environment in windows search bar and press enter.
No alt text provided for this image

2. Click on environment variables.

No alt text provided for this image

3. Double Click on path in syste Variables.

No alt text provided for this image

4. Click on New and paste the location there.

No alt text provided for this image

Now your path is added. Run this to check that it is working fine or not.

No alt text provided for this image
  • Now kubectl is installed.
  • Next step is installing Minikube. You can download from here.
  • Before running installation, make sure that you have virtualization installed.

For this, RUN on CMD

systeminfo

If you see the following output, virtualization is supported on Windows.

Hyper-V Requirements:     VM Monitor Mode Extensions: Yes
                          Virtualization Enabled In Firmware: Yes
                          Second Level Address Translation: Yes
                          
                          Data Execution Prevention Available: Yes
                            

If you see the following output, your system already has a Hypervisor installed.

Hyper-V Requirements:     A hypervisor has been detected. Features required for Hyper-V will not be displayed.

If you do not already have a hypervisor installed, install one of these now:

  1. Hyper - V
  2. VirtualBox
  • Now execute the installer and complete the setup. If you have VMware go down to check for that...
  • Check once that it is added to path or not. If not, then add it manually.

Confirm installation:

To confirm successful installation of both a hypervisor and Minikube, you can run the following command to start up a local Kubernetes cluster:

minikube start

If this showing error:

minikube start --driver=<driver_name>

Note: For setting the --driver with minikube start, enter the name of the hypervisor you installed in lowercase letters where <driver_name> is mentioned.

Once this command finish, run the command below to check the status.

minikube status

If everything is going fine, run this command to open dashboard...

No alt text provided for this image

If you have host driver issue....

  1. Go to virtualbox and click setting option.
  2. Click on Network section.
  3. Do like this...
No alt text provided for this image

If this not shown, make a new Host driver, for this press Ctrl+h and create a new host and select then this.

  • For closing the minikube, run minikube stop on CMD.

Now your setup is ready, you can do what you want in Kubernetes...

Now if you have VMware installed, then add these step too.

You might be getting this type of error.

No alt text provided for this image

First, you need some additional software from VMWare. Go to the link.

https://github.com/machine-drivers/docker-machine-driver-vmware/releases/latest

Download the .exe file for Windows and rename the file to docker-machine-driver-vmware.exe and place it somewhere in your path. I picked C:\Windows\System32 but anywhere that’s set up in your ENV should be fine.

Add the binary to path as we do above.

In an administrator run command prompt:

minikube start --vm-driver vmware

You might not see your new minikube VM inside your VMWare Workstation Console after completing the command. Just scan for VM Images starting a C:\ and it will show up.

If things get stuck, you might have to disable Hyper-V and reboot. If you do this, things like Docker for Desktop on Windows will stop working. That’s okay.

Run this on CMD as administrator.

bcdedit /set hypervisorlaunchtype off

Reboot, delete your minikube instance and try again. Might be this not working properly so I suggest to use virtualbox for this. Go to this link to check if you have some similar problem...

minikube delete

minikube start --vm-driver vmware

Feel free to comment or DM me if you have any error...??

Reference:

Happy Learning :)

Rohit Sharma

Cloud Architect @ The Henson Group | Scalable Cloud Solutions, Infrastructure Automation, CI/CD Optimization

4 年

Good Job

Jaydeep Tewary

Product Owner | Driving Innovation & Delivering Impactful Solutions | Passionate about Agile and Customer-Centric Growth

4 年

Gaurav Gupta I would like to say that the dedication u have shown for solving my problem is really commendable I have not seen such a dedication for solving a problem for a stranger Taking remote login and deep diving for understanding the problem Vimal sir is delivering his best in the training but I would like to say coordinators like u makes this training goes smooth for everyone Vimal Daga Preeti Chandak

Mukul Kumar

DevOps | Web 3.0 | Blockchain

4 年

Bro could you please help me out

  • 该图片无替代文字
回复
Jaydeep Tewary

Product Owner | Driving Innovation & Delivering Impactful Solutions | Passionate about Agile and Customer-Centric Growth

4 年

Still, i am receiving the error after following all your steps

  • 该图片无替代文字
回复

要查看或添加评论,请登录

Gaurav Gupta的更多文章

社区洞察

其他会员也浏览了