Installing Minikube on Windows:
We will be using VirtualBox as the hypervisor to create the Minikube VM. Make sure Hyper-V is disabled while running VirtualBox.
Please note that Windows support is currently in the experimental phase, and you might encounter issues during installation.
Following are the instructions to install Minikube on Windows 10:
Install the latest version of VirtualBox
Go to the Minikube release page
Download the Minikube binary from the Distribution section
Add the downloaded Minikube binary to your PATH
Set the default VM driver for Minikube
Open the Powershell using the Run as Administrator option, and execute the following command:
> PS C:\Windows\system32> minikube config set vm-driver virtualbox
These changes will take effect upon a minikube delete and then a minikube start
Start Minikube
We can start Minikube using the minikube start command. Open the Powershell using the Run as Administrator option and execute the following command:
>PS C:\WINDOWS\system32> minikube start
Starting local Kubernetes v1.9.0 cluster...
Starting VM...
Getting VM IP address
Moving files into cluster...
Downloading localkube binary
162.41 MB / 162.41 MB [============================================] 100.00% 0s
0 B / 65 B [----------------------------------------------------------] 0.00%
65 B / 65 B [======================================================] 100.00% 0s
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
Kubectl is now configured to use the cluster.
Loading cached images from config file.
Check the status
We can see the status of Minikube using the minikube status command. Open the Powershell using the Run as Administrator option and execute the following command:
> PS C:\WINDOWS\system32> minikube status
minikube: Running
cluster: Running
kubectl: Correctly Configured: pointing to minikube-vm at 192.168.99.100
Stop Minikube
We can stop Minikube using the minikube stop command. Open the Powershell using the Run as Administrator option and execute the following command:
> PS C:\WINDOWS\system32> minikube stop
Stopping local Kubernetes cluster
Machine stopped.
According to the CRI-O website,
"CRI-O is an implementation of the Kubernetes CRI (Container Runtime Interface) to enable using OCI (Open Container Initiative) compatible runtimes."
In order to start Minikube with CRI-O, run the following command:
$ minikube start --container-runtime=cri-o
Starting local Kubernetes v1.9.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
Kubectl is now configured to use the cluster.
Loading cached images from config file.
Now, let's do ssh login to the Minikube's VM:
$ minikube ssh
$ minikube ssh
_ _
_ _ ( ) ( )
___ ___ (_) ___ (_)| |/') _ _ | |_ __
/' _ ` _ `\| |/' _ `\| || , < ( ) ( )| '_`\ /'__`\
| ( ) ( ) || || ( ) || || |\`\ | (_) || |_) )( ___/
(_) (_) (_)(_)(_) (_)(_)(_) (_)`\___/'(_,__/'`\____)
$
Note: If you try to list containers using the docker command, it will not bring up any results, because we don't use Docker to run containers:
$ sudo docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
To list the containers created via the CRI-O container runtime, use the following command:
$ sudo runc list
ID PID STATUS BUNDLE
CREATED OWNER
19a91e254e6cb6e6b5677c74a46d6e34b6114389df6032c069d834eff43473a8 3701 running /var/run/containers/storage/overlay-containers/19a91e254e6cb6e6b5677c74a46d6e34b6114389df6032c069d834eff43473a8/userdata 2018-02-13T05:36:58.342206032Z root 258b88b60665833c6991495b98c0b91b3ebaf5146fd661366fc3c904adaa96b3 3538 running /var/run/containers/storage/overlay-containers/258b88b60665833c6991495b98c0b91b3ebaf5146fd661366fc3c904adaa96b3/userdata 2018-02-13T05:36:34.607314459Z root 25ddc8d8588b72c1c891644901c92decc58a01b34fe0b303e7654aea029b75a0 4839 running /var/run/containers/storage/overlay-containers/25ddc8d8588b72c1c891644901c92decc58a01b34fe0b303e7654aea029b75a0/userdata 2018-02-13T05:38:03.411396745Z root 2c0effcb8b7c8afdecfacd3b22b8013c07ab0abf3604466f5f5a59d41c6d7f53 4662 running /var/run/containers/storage/overlay-containers/2c0effcb8b7c8afdecfacd3b22b8013c07ab0abf3604466f5f5a59d41c6d7f53/userdata 2018-02-13T05:37:52.214166848Z root ...