Minikube Install on Windows
Install 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\minikube
or similar to the PATH (inSystem Settings
>Environment Variables
) - Test that minikube works:
More info at Getting Started
Install kubectl
¶
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
OR
Then
Run kubectl version to verify that the version you’ve installed is sufficiently up-to-date.
Configure kubectl
¶
Configure kubectl
to use a remote Kubernetes cluster
- If
~/.kube
config does not exist (it should have been created byminikube
), enter the following in Powershell:
-
Edit the config file with a text editor of your choice.
-
Check that
kubectl
is properly configured by getting the cluster state:
- Enable auto-completion (if you use Git Bash)
- 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
Run kubectl
from the Ubuntu on Windows command line¶
If installed by choco
Run minikube
¶
Running Kubernetes Locally via Minikube
- Install curl
- Test curl
- Start minikube
- List hosts
- Test by deploying a container (creates a deployment / pod automatically)
- Provide a dynamic port to the container (creates a service automatically)
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:
Once the pod is running, curl it:
- Cleanup:
Install Helm¶
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:
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