Some notes when troubleshooting Minikube issue (Docker issue with HyperV & ). + Should place kubectl path before Docker path in%PATH%, because new Docker versions also bundle a kubectl executable.
As i understand there is an internal queue or other structure which is not cleaned up after “kubectl delete deployment”. What you expected to happen: The “kubectl delete” call must clear all the data associated with the deployment and return to the initial state.
+ If already has gcloud shell, install kubectl from there gcloud components install kubectl (GcloudSDK already in%PATH%, no need using other ways, easier to check version) + On Win 10: prefer HyperV over VirtualBox: they might conflict about memory issue, minikube can use either with appropriate driver (e.g.vm-driver hyperv ), but Docker will be more picky. This might lead to some silly circular issues, especially when mixed with some other issues.
+ HyperV switch should be “External” – can based on Wireless adapter or Ethernet adapter depending on your current connection – but make sure to disable IPv6 on this switch adapter, for cluster local minikube. (Using “Internal” switch is possible, but would require some more configuration). + Executable of minikube (minikube.exe) should be placed on drive of “%UserProfile%”, namely “C:” drive. Not easily fixed to “D:” or “E:” without some quirky hacks.
This sound silly (Windoze tradition!), but there is a number of GitHub issues about that, like: + Can use HyperV management tool ( virtmgmt.msc) to stop the minikube cluster with HyperV driver, even when the OS tool shutdown ( ` minikube stop` ) doesn’t work. Yet for other purposes don’t use HyperV console, use minikube or docker-machine + On minikube HyperV, it’s recommended to disable dynamic memory management, and set at least 4096MB (or runtime param `–memory 4096` ), to avoid issues such as: + When minikube issue occurs and you want to re-install cleanly, make sure to remove%UserProfile%/.kube and.minikube folders, which contains some cache and config might reproduce your issue. For example,.kube/config might contain old IP address, and SSH client might fail until fix IP (or make it static in LAN NAT) + If minikube version latest (v0.28.2) does not work, you might remove it and use previous version ( or ).
Besides, it’s recommended to used elevated (Administrator) console, even PowerShell, except for GitBash. Anyway, too much hassle for a should-be-simple installation. This might be an obstacle/impediment for people who don’t have high patience. If you don’t want to endure it, I would recommend using.
Win 10 is really slow for development, especially when Docker involves (platform dependent internally)./.
On February 21, 2017, Microsoft support for Kubernetes on Azure Container Service (GA). The integration of Kubernetes with Azure Container Service, consumer will be able to create a fully functional Kubernetes cluster that is integrated with the rest of your Azure resources. To understand and develop capabilities of Kubernetes with ACS for development, I had to setup Kubernetes on my local windows 10 laptop. In this blog post, I am going to take you through setting up Minikube on your Windows 10 development machine and along the way I will share my experience. I would strongly recommend you go through some basic materials on, and concepts. In general, solution like Kubernetes requires bit of efforts to setup the environment locally.
Ideally, you need development environment which is like QA/staging and allow you to do your development on your laptop. This was the goal of project which helps you run Kubernetes on your development machine. Pre-requisites for Development Machine Environment:. VT-x/AMD-v virtualization must be enabled in BIOS (requires machine restart). Enable Hyper-V – go to Windows features On or Off, you will see dialog box with a list of Windows features as shown below. Navigate to the Hyper-V section and enable it (requires machine restart). Minikube Installation: I prefer to use Hyper-V over VirtualBox to setup Kubernetes on my Windows machine because of its native windows support.
In this blog, I am installing docker and then Kubernetes but you can install Kubernetes without Docker. (Optional) The first step is to download Beta Channel Docker for Windows from. Run Setup default configuration to Install Docker on your machine.
Refer if you need details about how to setup Docker on Windows 10 machine. Once you have successfully installed Docker, confirm deployment by typing “docker info” command in Command window as shown below. Now, we will setup a new external network switch which will be used by our Hyper-V to setup the Kubernetes on local machine as described below. O Make sure you have Ethernet connectivity while you are setting this.
O Open the Hyper-V manager. O Select the Virtual Switch Manager on the left-side Actions panel. O Set up a new external network switch to use instead of Docker NAT network switch (for Moby), which is set up by default when you install Docker for Windows. O For this example, we created a virtual switch called “My Virtual Switch”. I would prefer to create one default Docker machine by using command docker-machine create -driver hyperv default The next step is to download the latest Minikube binary from and place that in the root folder of C drive. You may think why do you want to place binary in OS drive. This is because there is a bug in the Minikube which does not allow to install the local cluster if it is place anywhere other than C drive or in OS drive.
Refer for more details about bug. The file name is minikube-windows-amd64.exe. Rename this exe as “minikube” (just for simplicity).
Download the Kubectl command line utility from and copy this alongside the kubectl.exe file from the previous section. We are all set now to launch a local Kubernetes one node cluster. Launch the PowerShell in Administrator mode and navigate to the drive where you have copied kubectl.exe and minikube.exe.
Let’s do standard testing to validate Minikube deployment by finding the version of Minikube and supported Kubernetes version as shown below. Go to%HOMEPATH%.minikube folder and you will notice several folders are created. Minikube.exe version minikube version: v0.14.0 PS C:. Minikube get-k8s-versions The following Kubernetes versions are available: - v1.6.0-alpha.0 - v1.5.2 - v1.5.1 - v1.4.5 - v1.4.3 - v1.4.2 - v1.4.1 - v1.4.0 - v1.3.7 - v1.3.6 - v1.3.5 - v1.3.4 - v1.3.3 - v1.3.0 There are multiple commands that Minikube supports. You can use ‘-help’ option to see the list of commands.
Start Kubernetes Cluster locally We are now ready to launch our Kubernetes cluster locally and we use start command for it. Before we start the cluster, we will check available flags/options via the help options and will use few of them. We want to use Kubernetes version v1.5.2 and VM driver is hyperv.
If you would like to add more memory to local Kubernetes cluster, I would recommend using memory flag. Make sure you define hyperv-virtual-switch flag which should point to the external network switch you have created previously. We are also going to use couple of global flags like -v=7 and -alsologtostderr to see what is going on under the hood. Minikube.exe start -help Usage: minikube start flags Flags: -container-runtime string The container runtime to be used -cpus int Number of CPUs allocated to the minikube VM (default 2) -disk-size string Disk size allocated to the minikube VM (format: , where unit = b, k, m or g) (default '20g') -docker-env stringArray Environment variables to pass to the Docker daemon. (format: key=value) -extra-config ExtraOption A set of key=value pairs that describe configuration that may be passed to different components. The key should be '.'
Separated, and the first part before the dot is the component to apply the configuration to. Valid components are: kubelet, apiserver, controller-manager, etcd, proxy, scheduler.host-only-cidr string The CIDR to be used for the minikube VM (only supported with Virtualbox driver) (default '192.168.99.1/24') -hyperv-virtual-switch string The hyperv virtual switch name. Defaults to first found. (only supported with HyperV driver) -insecure-registry stringSlice Insecure Docker registries to pass to the Docker daemon -iso-url string Location of the minikube iso (default '-kubernetes-version string The kubernetes version that the minikube VM will use (ex: v1.2.3) OR a URI which contains a localkube binary (ex: (default 'v1.5.1') -kvm-network string The KVM network name.
Thanks Wasim. Steps mentioned in this post works (mostly:-)). Just few observations/troubleshooting tips (with Kubernetes 1.7.0) below – Creating a docker-machine is not required. However, creating a Virtual Switch is mandatory for Hyper-V mode. After running minikube status, if you observe – localkube is in stopped mode but minikube is in running mode, run following commands – minikube stop minikube delete Delete.minikube &.kube folder.
They are generally found at c: users.minikube & c: users.kube Then restart machine and re-run command – minikube.exe start –kubernetes-version=”vx.y.z” –vm-driver=”hyperv” –hyperv-virtual-switch=”My Virtual Switch” –v=7 –logtostderr.