Kubernetes or K8s is an open-source platform to manage containerized workloads and applications. With containers, it's easy to manage, run or ship your application. Kubernetes helps to manage cloud resources and makes your cloud infrastructure more scalable by automating and deploying applications in no time. While installing Kubernetes for the first time, these are the steps I followed on my Windows 10 home. Let’s explore each of them:
Hyper-V is window's own virtualization software same as Virtualbox. If you are using windows home, you need to install Hyper-V. Here is the article for that. After installing, follow these steps to enable Hyper-V on your local machine.
- Open search bar and go to control panel
- On the left side of the control panel, click on program and then on programs and features.
- Turn on the Windows features on and off.
- Check on the Hyper-V and Windows Hypervision Platform, click the OK button.
- It may take a few minutes to install Hyper-V on the system, in some cases, your system will reboot itself a couple of times.
- To verify the successful installation of Hyper-V on Windows, open windows Powershell, run it as an administrator, and paste the below command. Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V
You can install any alternatives of docker like Containerd, RunC, Podman, and many more to mention. Although I am installing Kubernetes for the first time in the system, I used the Docker desktop. Click here to go to the official website of docker and click on Get Docker Desktop. Follow the instructions while installing and you are ready to run Docker on your machine.
Follow these steps to install Kubernetes on windows 10 seamlessly.
- Open the Docker GUI tool and click on Settings.
- On the left plane, click on Kubernetes and check on Enable Kubernetes Apply the changes, wait for 5 to 10 minutes, or until the installation complete popup message is shown up on the screen. To confirm the running of Kubernetes, hover your mouse pointer on the down left side of the Docker desktop plane, you will see “Kubernetes Running” message.
Kubernetes UI is not installed by default. It’s a web-based interface and can be accessed via a web browser. Open the command prompt and paste the given script to deploy dashboard UI.
kubectl apply -f https://raw.githubusercontent.com/Kubernetes/dashboard/v2.4.0/aio/deploy/recommended.yaml
In my case, the command was showcasing some error with my Linux, so I reinstalled Ubuntu 20.04 LTS. If you don’t have any Linux distribution, install from the Microsoft store in case of any error.
You need to create a sample user to access the Kubernetes dashboard. Follow this article to create a sample user and generate token.
To enable access to the dashboard, use the below command in the terminal
The dashboard will be available at http://localhost:8001/api/v1/namespaces/Kubernetes-dashboard/services/https:Kubernetes-dashboard:/proxy/
If everything is done right you will be able to get access to the dashboard.
These are the steps I followed to install Kubernetes on windows 10 home. I hope this article was helpful. If you still face any problems, comment down below, I will try to get back to you with the solution.