Kubernetes Installation On Windows
Gaurav Gupta
M.tech(AI)@IIITL | Django Developer | Web Developer | Freelancer | DevOps & Cloud Expert | Blogger
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:
- Search for environment in windows search bar and press enter.
2. Click on environment variables.
3. Double Click on path in syste Variables.
4. Click on New and paste the location there.
Now your path is added. Run this to check that it is working fine or not.
- 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:
- 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...
If you have host driver issue....
- Go to virtualbox and click setting option.
- Click on Network section.
- Do like this...
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.
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:
- https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-on-windows
- https://kubernetes.io/docs/setup/learning-environment/minikube/#installation
- https://kubernetes.io/docs/setup/learning-environment/minikube/#interacting-with-your-cluster
Happy Learning :)
Cloud Architect @ The Henson Group | Scalable Cloud Solutions, Infrastructure Automation, CI/CD Optimization
4 年Good Job
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
DevOps | Web 3.0 | Blockchain
4 年Bro could you please help me out
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