I have been trying to install minikube for two days now. I have run into issue after issue. This one has me stumped.
As you are able to see kubeadm
version it suggest that you used Kubernetes kubeadm, which is bit different from Minikube
.
Kubeadm is a tool to get Kubernetes working on existing machine. It will configure and start all required Kubernetes
components. Using Kubeadm
you are able to create cluster with multiple nodes (kubeadm join).
Minikube is a tool which start single Kubernets Cluster
local node.
There is already good explanation in this Stackoverflow question.
I don't think that Kubeadm configuration
from Linux will work on Windows. As you mentioned in comment, that you want to run Minikube
in windows to learn Kubernetes, I will provide step by step how to run Minikube
on Windows 10.
Installation Minikube on Windows 10
As you already have docker I will skip that installation steps.
1. Download kubectl
and minikube
.
Newest version is provided in official kubernetes docs.
kubectl v1.17 and minikube from github (minikube-windows-amd64.exe
).
2. Add to PATH
form folder to Environment Variables
.
Create folder where you will paste kubectl.exe
and renamed minikube.exe
file.
Add This folder to PATH
. (If someone would need here is tutorial).
3. Create external Virtual Switch Manager
in Hyper-V
.
Go to Hyper-V
. From the right menu choose Virtual Switch Manager
. Choose External
and name it Primary Virtual Switch
. Then apply.
4. Verify minikube
and kubeadm
versions.
PS C:\WINDOWS\system32> kubectl version
Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.0", GitCommit:"70132b0f130acc0bed193d9ba59dd186f0e634cf", GitTreeState:"clean", BuildDate:"2019-12-07T21:20:10Z", GoVersion:"go1.13.4", Compiler:"gc", Platform:"windows/amd64"}
Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.0", GitCommit:"70132b0f130acc0bed193d9ba59dd186f0e634cf", GitTreeState:"clean", BuildDate:"2019-12-07T21:12:17Z", GoVersion:"go1.13.4", Compiler:"gc", Platform:"linux/amd64"}
PS C:\WINDOWS\system32> minikube version
minikube version: v1.6.2
commit: 54f28ac5d3a815d1196cd5d57d707439ee4bb392
5. Create Minikube Cluster
.
Run PowerShell
as Administrator.
minikube start --vm-driver hyperv --hyperv-virtual-switch "Primary Virtual Switch"
PS C:\WINDOWS\system32> minikube start --vm-driver hyperv --hyperv-virtual-switch "Primary Virtual Switch"
* minikube v1.6.2 on Microsoft Windows 10 Enterprise 10.0.17134 Build 17134
* Selecting 'hyperv' driver from user configuration (alternates: [])
* Creating hyperv VM (CPUs=2, Memory=2000MB, Disk=20000MB) ...
* Preparing Kubernetes v1.17.0 on Docker '19.03.5' ...
* Pulling images ...
* Launching Kubernetes ...
* Waiting for cluster to come online ...
* Done! kubectl is now configured to use "minikube"
Now you can use kubectl
commands and already have default resources required for running Minikube
.
PS C:\WINDOWS\system32> kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-6955765f44-c4cbj 1/1 Running 0 31m
kube-system coredns-6955765f44-rqfth 1/1 Running 0 31m
kube-system etcd-minikube 1/1 Running 0 31m
kube-system kube-addon-manager-minikube 1/1 Running 0 31m
kube-system kube-apiserver-minikube 1/1 Running 0 31m
kube-system kube-controller-manager-minikube 1/1 Running 0 31m
kube-system kube-proxy-j6q29 1/1 Running 0 31m
kube-system kube-scheduler-minikube 1/1 Running 0 31m
kube-system storage-provisioner 1/1 Running 0 31m
In addition, you can check this article about running Minikube
on windows.
Also you can consider Docker for Windows which will do many things automatically, however it will install older version of kubernetes
(1.14 at the moment).