Reputation: 12750
I installed minikube
on my Linux box Lubuntu 16.04 on a Thinkpad X201i.
Here are my complete install steps:
Download and install the minikube server
cd programs/install/bin
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64;
chmod +x minikube;
Download and install the kubectl client
cd programs/install/bin
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x kubectl;
Install the libraries libvirt and qemu-kvm
sudo apt-get install libvirt-bin qemu-kvm
(NOTE: For Ubuntu 17.04 change the group to libvirt)
sudo usermod -a -G libvirtd $(whoami)
newgrp libvirtd
Install Docker Machine
cd /home/stephane/programs/install/bin
curl -L https://github.com/docker/machine/releases/download/v0.12.2/docker-machine-`uname -s`-`uname -m` > docker-machine;
chmod +x docker-machine
Install the KVM driver for Docker Machine
cd /home/stephane/programs/install/bin
curl -L https://github.com/dhiltgen/docker-machine-kvm/releases/download/v0.10.0/docker-machine-driver-kvm-ubuntu16.04 > docker-machine-driver-kvm;
chmod +x docker-machine-driver-kvm
On system reboot, the cluster seems to be started:
$ kubectl cluster-info
Kubernetes master is running at http://localhost:8080
$ minikube ip
$
I'm surprised about that, since I did not create any service for it to start.
And if it is started, then why is there no IP ?
I looked up in the /etc/init.d/
directory:
$ ll -t /etc/init.d/*virt*
-rwxr-xr-x 1 root 17K août 23 14:47 /etc/init.d/libvirt-guests*
-rwxr-xr-x 1 root 5,9K août 11 07:50 /etc/init.d/libvirt-bin*
-rwxr-xr-x 1 root 4,0K août 11 07:50 /etc/init.d/virtlockd*
-rwxr-xr-x 1 root 3,9K août 11 07:50 /etc/init.d/virtlogd*
$ ll -t /etc/init.d/docker
-rwxr-xr-x 1 root 3,8K mai 4 23:36 /etc/init.d/docker*
It can't be the docker deamon that starts my minikube
as there are no image in my docker:
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
At first, I was thinking of manually starting it.
But when I do so, it shows an attempt to start, but fails as it looks up an image that does not exist:
$ minikube start --vm-driver kvm
Starting local Kubernetes v1.7.5 cluster...
Starting VM...
E0912 18:23:37.989448 24423 start.go:143] Error starting host: Error starting stopped host: virError(Code=38, Domain=18, Message='Cannot access storage file '/root/.minikube/machines/minikube/boot2docker.iso' (as uid:64055, gid:129): Aucun fichier ou dossier de ce type').
I configured the BIOS and enabled the Virtualization and I do have accelaration enabled:
$ sudo /usr/sbin/kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used
I admit I installed the libraries in a non standard directory location:
/home/stephane/programs/install/bin
Some output from different commands:
$ egrep -c '(vmx|svm)' /proc/cpuinfo
4
$ virsh list --all
ID Nom État
----------------------------------------------------
It still says it is running:
$ kubectl cluster-info
Kubernetes master is running at http://localhost:8080
Although it cannot connect:
$ kubectl cluster-info dump
The connection to the server localhost:8080 was refused - did you specify the right host or port?
Why are these last two similar commands, giving such opposite signal ?
UPDATE: I typed in the rm -rf ~/.minikube/cache
command followed by the minikube start --vm-driver kvm
command a few times, and today it seemed to work:
$ minikube start --vm-driver kvm
Starting local Kubernetes v1.7.5 cluster...
Starting VM...
Downloading Minikube ISO
106.36 MB / 106.36 MB [============================================] 100.00% 0s
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.
$ minikube ip
192.168.42.196
Upvotes: 2
Views: 2023
Reputation: 1269
Have a look to the containers running on your docker daemon (docker ps), kubernetes is certainly running there.
I never tested minikube on linux so I'm not sure, but on windows, it runs as containers inside a linux vm.
Regards, Thibault
Upvotes: 1