Minikube Install on Windows
minikube on Windows¶
Minikube runs a single-node Kubernetes cluster inside a VM on your laptop for users looking to try out Kubernetes or develop with it day-to-day.
- For Windows, install VirtualBox or Hyper-V first.
- Minikube is distributed in binary form: GitHub Repo . Download the minikube-installer.exe file, and execute the installer. This should automatically add minikube.exe to your path with an uninstaller available as well.
- If needed, add
C:\Program Files (x86)\Kubernetes\minikubeor similar to the PATH (in
- Test that minikube works:
More info at Getting Started
Use a version of kubectl that is the same version as your server or later. Using an older
kubectl with a newer server might produce validation errors.
On Windows 10 (using Git Bash):
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.10.0/bin/windows/amd64/kubectl.exe
choco install kubernetes-cli
Run kubectl version to verify that the version you’ve installed is sufficiently up-to-date.
kubectl to use a remote Kubernetes cluster
~/.kubeconfig does not exist (it should have been created by
minikube), enter the following in Powershell:
cd C:\users\<yourusername> mkdir .kube cd .kube New-Item config -type file
Edit the config file with a text editor of your choice.
kubectlis properly configured by getting the cluster state:
- Enable auto-completion (if you use Git Bash)
echo "source <(kubectl completion bash)" >> ~/.bashrc
- You must have appropriate permissions to list, create, edit and delete pods in your cluster:
kubectl auth can-i list pods kubectl auth can-i create pods kubectl auth can-i edit pods kubectl auth can-i delete pods
kubectl from the Ubuntu on Windows command line¶
If installed by
export PATH=$PATH:/mnt/c/ProgramData/chocolatey/bin/kubectl # then use: kubectl.exe
- Install curl
choco install curl
- Test curl
- Start minikube
- List hosts
kubectl get nodes
- Test by deploying a container (creates a deployment / pod automatically)
kubectl run hello-minikube --image=k8s.gcr.io/echoserver:1.4 --port=8080
- Provide a dynamic port to the container (creates a service automatically)
kubectl expose deployment hello-minikube --type=NodePort
We have now launched an echoserver pod but we have to wait until the pod is up before curling/accessing it via the exposed service. To check whether the pod is up and running we can use the following:
kubectl get pod
Once the pod is running, curl it:
curl $(minikube service hello-minikube --url)
kubectl delete deployment hello-minikube
kubectl delete service hello-minikube
Helm is a package manager for Kubernetes. Download a binary release of the Helm client from here
- Once you have Helm ready, you can initialize the local CLI and also install Tiller into your Kubernetes cluster in one step:
$ helm init
This will install Tiller (the helm server) into the current Kubernetes cluster (as listed in
kubectl config current-context).
- Install a test Helm chart, then clean up
helm repo update # Make sure we get the latest list of charts helm install stable/mysql helm ls helm status <release name> helm delete <release name>