{"id":8384,"date":"2023-12-16T00:12:46","date_gmt":"2023-12-16T00:12:46","guid":{"rendered":"https:\/\/cheapwindowsvps.com\/blog\/step-by-step-guide-to-installing-minikube-on-windows\/"},"modified":"2025-01-20T11:33:41","modified_gmt":"2025-01-20T11:33:41","slug":"step-by-step-guide-to-installing-minikube-on-windows","status":"publish","type":"post","link":"https:\/\/cheapwindowsvps.com\/blog\/step-by-step-guide-to-installing-minikube-on-windows\/","title":{"rendered":"Step-by-Step Guide to Installing Minikube on Windows"},"content":{"rendered":"<div>Minikube is an ideal solution for setting up a Kubernetes cluster for a test or development environment. It only requires a single node, optionally as a virtual machine. To install Minikube on Windows, several preparations are required, including the installation of Docker.<\/div>\n<p>The first step to install Kubernetes on Windows 10\/11 or Windows Server 2019\/2022 is to <a href=\"https:\/\/github.com\/kubernetes\/minikube\" target=\"_blank\" rel=\"nofollow noopener\">download<\/a> the installation files of the current version from GitHub. The page <a href=\"https:\/\/minikube.sigs.k8s.io\/docs\/start\" target=\"_blank\" rel=\"nofollow noopener\">minikube start<\/a> lists the system requirements and describes the first steps.<\/p>\n<p>If Minikube is operated in a VM, it should have at least two vCPUs, 2 GB of RAM, and 20 GB of free disk space.<\/p>\n<h2>Nested virtualization necessary<\/h2>\n<p>If Docker and Minikube are to run in a VM on WSL2, <a href=\"https:\/\/4sysops.com\/archives\/set-up-nested-hyper-v-virtualization\/\" target=\"_blank\" rel=\"nofollow noopener\">nested virtualization<\/a> should be activated. Follow these steps under Hyper-V:<\/p>\n<pre>Set-VMProcessor -VMName &lt;Name of the VM&gt; `<\/pre>\n<p>-ExposeVirtualizationExtensions $true<\/p>\n<p>Get-VMNetworkAdapter -VMName &lt;Name of the VM&gt; |<\/p>\n<p>Set-VMNetworkAdapter -MacAddressSpoofing On<\/p>\n<p>There is no feedback for these commands if the modification has been successful.<\/p>\n<h2>Deploy Docker or a virtualization solution for Kubernetes<\/h2>\n<p>Kubernetes can be built on a computer that has either virtualization software or a container solution. Your options include Docker, QEMU, Hyperkit, Hyper-V, KVM, Parallels, Podman, VirtualBox, or VMware WoVMware Workstation.<\/p>\n<p>This guide specifically uses Docker as an example. That being said, it&#8217;s recommended that you have Docker Desktop for Windows installed on your computer in advance. Instead of Hyper-V, you can opt to run the containers in the <a href=\"https:\/\/4sysops.com\/archives\/install-subsystem-for-linux-2-wsl2-on-windows-server\/\" target=\"_blank\" rel=\"nofollow noopener\">Windows Subsystem for Linux 2.0 (WSL2)<\/a>.<\/p>\n<h2>Update WSL Kernel in Windows 11<\/h2>\n<p>On many systems, after installing Docker, a notice appears that WSL2 needs to be updated. This is done with this command:<\/p>\n<pre>wsl --update<\/pre>\n<p>Generally, it is advisable to restart the computer afterward.<\/p>\n<p>After the installation, verify the installed version with this command:<\/p>\n<pre>docker version<\/pre>\n<p>This also shows whether Docker is working on the test PC.<\/p>\n<p><a href=\"https:\/\/4sysops.com\/wp-content\/uploads\/2023\/12\/Check-Docker-installation.png\" target=\"_blank\" rel=\"nofollow noopener\">Check Docker installation<\/a><\/p>\n<h2>Operate Minikube<\/h2>\n<p>After downloading, the Minikube start file <em>minikube.exe<\/em> can be found in the target directory. This folder must be added to the system path. This can be done in a PowerShell session with elevated rights:<\/p>\n<p>After opening a new PowerShell session, the command minikube shows the online help. This indicates that Minikube is now working and the cluster can be set up.<\/p>\n<p><a href=\"https:\/\/4sysops.com\/wp-content\/uploads\/2023\/12\/Calling-Minikube-without-parameters-outputs-the-online-help.png\" target=\"_blank\" rel=\"nofollow noopener\">Calling Minikube without parameters outputs the online help<\/a><\/p>\n<h2>Setting up a Kubernetes Cluster with Minikube<\/h2>\n<p>To create a Kubernetes cluster with Minikube, enter this command:<\/p>\n<pre>minikube start<\/pre>\n<p>Minikube downloads then the necessary files for the Kubernetes container.<\/p>\n<p>It is important here that the Docker service is started. If not, it is best to reboot the PC.<\/p>\n<div><a href=\"https:\/\/4sysops.com\/wp-content\/uploads\/2023\/12\/Start-Minikube-via-the-Command-Line.png\" target=\"_blank\" rel=\"nofollow noopener\">Start Minikube via the Command Line<\/a><\/div>\n<p>The status of Minikube can be displayed as follows:<\/p>\n<pre>minikube status<\/pre>\n<p>Now, for example, you can display all its resources with this command:<\/p>\n<pre>kubectl get all<\/pre>\n<p>And with this command you check if the cluster endpoint is working and determine the cluster&#8217;s IP address:<\/p>\n<pre>kubectl cluster-info<\/pre>\n<p>Further commands that provide a quick overview of the environment include:<\/p>\n<ul>\n<li><strong>Kubectl get services<\/strong>: Services in the namespace<\/li>\n<li><strong>Kubetcl get pods &#8211;all-namespaces<\/strong>: All pods in all namespaces<\/li>\n<li><strong>Kubectl get pods -o wide<\/strong>: Extended information about the pods in the general namespace<\/li>\n<li><strong>Kubectl get deployment &lt;Deployment&gt;:<\/strong> Information about a specific deployment<\/li>\n<li><strong>Kubectl get pods<\/strong>: Pods in the current namespace<\/li>\n<li><strong>Kubectl get nodes<\/strong>: Nodes in the cluster<\/li>\n<\/ul>\n<p>With the <em>describe<\/em> parameter, further information can be displayed for various objects, such as the nodes:<\/p>\n<pre>kubectl describe nodes<\/pre>\n<p><a href=\"https:\/\/4sysops.com\/wp-content\/uploads\/2023\/12\/Display-Information-about-Pods-and-Cluster.png\" target=\"_blank\" rel=\"nofollow noopener\">Display Information about Pods and Cluster<\/a><\/p>\n<h2>Summary<\/h2>\n<p>Minikube facilitates the easy establishment of a Kubernetes cluster for a lab environment and to gain primary exposure to container orchestration.<\/p>\n<p>The installation within a Windows VM requires an active nested virtualization and Docker for Windows to be set up, ideally on WSL2.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Minikube is an ideal solution for setting up a Kubernetes cluster for a test or development environment. It only requires a single node, optionally as a virtual machine. To install Minikube on Windows, several preparations are required, including the installation of Docker. The first step to install Kubernetes on Windows 10\/11 or Windows Server 2019\/2022 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":8385,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[92,95,132],"tags":[],"class_list":["post-8384","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-articles","category-devops","category-kubernetes"],"_links":{"self":[{"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/posts\/8384","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/comments?post=8384"}],"version-history":[{"count":1,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/posts\/8384\/revisions"}],"predecessor-version":[{"id":10450,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/posts\/8384\/revisions\/10450"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/media\/8385"}],"wp:attachment":[{"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/media?parent=8384"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/categories?post=8384"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/tags?post=8384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}