minikube not starting using cri-o

Created on 27 Nov 2017  路  2Comments  路  Source: kubernetes/minikube

Is this a BUG REPORT or FEATURE REQUEST?

/kind bug

Please provide the following details:

Environment:

minikube version: v0.23.0

OS:
NAME=Fedora
VERSION="25 (Workstation Edition)"
ID=fedora
VERSION_ID=25
PRETTY_NAME="Fedora 25 (Workstation Edition)"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:fedoraproject:fedora:25"
HOME_URL="https://fedoraproject.org/"
SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=25
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=25
PRIVACY_POLICY_URL=https://fedoraproject.org/wiki/Legal:PrivacyPolicy
VARIANT="Workstation Edition"
VARIANT_ID=workstation

VM driver:
    "DriverName": "kvm",

ISO version
        "ISO": "/home/fedora/.minikube/machines/minikube/boot2docker.iso",
        "Boot2DockerURL": "file:///home/fedora/.minikube/cache/iso/minikube-v0.23.6.iso",

What happened:

This should start minikube with cri-o but it is still picking docker.

minikube start \
>     --network-plugin=cni \
>     --extra-config=kubelet.container-runtime=remote \
>     --extra-config=kubelet.container-runtime-endpoint=/var/run/crio.sock \
>     --extra-config=kubelet.image-service-endpoint=/var/run/crio.sock --cpus=4 --memory 6000 --vm-driver=kvm -v 10

What you expected to happen:

minikube should start with cri-o

How to reproduce it:

When starting minikube with cri-o it still uses docker!

$ minikube start \
>     --network-plugin=cni \
>     --extra-config=kubelet.container-runtime=remote \
>     --extra-config=kubelet.container-runtime-endpoint=/var/run/crio.sock \
>     --extra-config=kubelet.image-service-endpoint=/var/run/crio.sock --cpus=4 --memory 6000 --vm-driver=kvm -v 10
Aliases:
Aliases:
map[string]string{}
Override:
map[string]interface {}{"v":"10"}
...
(minikube) Calling .GetSSHUsername
Moving files into cluster...
Setting up certs...
Connecting to cluster...
(minikube) Calling .GetURL
(minikube) DBG | GetURL called
(minikube) DBG | GetIP called for minikube
(minikube) DBG | Failed to retrieve dnsmasq leases from /var/lib/libvirt/dnsmasq/docker-machines.leases
(minikube) DBG | IP address: 192.168.42.227
(minikube) DBG | Unable to locate IP address for MAC 52:54:00:0b:eb:0b
Setting up kubeconfig...
Starting cluster components...
Kubectl is now configured to use the cluster.
Making call to close driver server
(minikube) Calling .Close
(minikube) DBG | Closing plugin on server side
Successfully made call to close driver server
Making call to close connection to plugin binary
Making call to close driver server
(minikube) Calling .Close
(minikube) DBG | Closing plugin on server side
Successfully made call to close driver server
Making call to close connection to plugin binary

Full set of logs: http://pastebin.centos.org/443786/

$ kubectl get pods --all-namespaces
NAMESPACE     NAME                             READY     STATUS    RESTARTS   AGE
kube-system   default-http-backend-7wvbt       1/1       Running   1          2d
kube-system   heapster-t9p9l                   1/1       Running   1          2d
kube-system   influxdb-grafana-bbtbp           2/2       Running   2          2d
kube-system   kube-addon-manager-minikube      1/1       Running   1          2d
kube-system   kube-dns-6fc954457d-jp2lx        3/3       Running   3          2d
kube-system   kubernetes-dashboard-8s7nm       1/1       Running   1          2d
kube-system   nginx-ingress-controller-shg6v   1/1       Running   1          2d
kube-system   registry-69vtc                   1/1       Running   1          2d

All the pods are running!

Inside minikube all the pods are running on docker

$ minikube ssh
                         _             _
            _         _ ( )           ( )
  ___ ___  (_)  ___  (_)| |/')  _   _ | |_      __
/' _ ` _ `\| |/' _ `\| || , <  ( ) ( )| '_`\  /'__`\
| ( ) ( ) || || ( ) || || |\`\ | (_) || |_) )(  ___/
(_) (_) (_)(_)(_) (_)(_)(_) (_)`\___/'(_,__/'`\____)

$ docker ps
CONTAINER ID        IMAGE                                                 COMMAND                  CREATED             STATUS              PORTS               NAMES
9956af79fdd8        gcr.io/google_containers/heapster-grafana-amd64       "/run.sh"                5 minutes ago       Up 5 minutes                            k8s_grafana_influxdb-grafana-bbtbp_kube-system_95e89d49-d1c8-11e7-8217-5254009d0812_1
a1d588da3ca4        gcr.io/google_containers/defaultbackend               "/server"                5 minutes ago       Up 5 minutes                            k8s_default-http-backend_default-http-backend-7wvbt_kube-system_961b9a84-d1c8-11e7-8217-5254009d0812_1
07f2d652e784        fed89e8b4248                                          "/sidecar --v=2 --..."   5 minutes ago       Up 5 minutes                            k8s_sidecar_kube-dns-6fc954457d-jp2lx_kube-system_96b7a4be-d1c8-11e7-8217-5254009d0812_1
a276d9ee33d4        gcr.io/google_containers/kubernetes-dashboard-amd64   "/dashboard --inse..."   5 minutes ago       Up 5 minutes                            k8s_kubernetes-dashboard_kubernetes-dashboard-8s7nm_kube-system_95869efb-d1c8-11e7-8217-5254009d0812_1
6cdf7ce4d759        registry                                              "/entrypoint.sh /e..."   5 minutes ago       Up 5 minutes                            k8s_registry_registry-69vtc_kube-system_96f56599-d1c8-11e7-8217-5254009d0812_1
d512194a73b1        gcr.io/google_containers/heapster                     "/heapster --sourc..."   5 minutes ago       Up 5 minutes                            k8s_heapster_heapster-t9p9l_kube-system_95c37352-d1c8-11e7-8217-5254009d0812_1
6cae0313c700        gcr.io/google_containers/nginx-ingress-controller     "/usr/bin/dumb-ini..."   5 minutes ago       Up 5 minutes                            k8s_nginx-ingress-controller_nginx-ingress-controller-shg6v_kube-system_96338c84-d1c8-11e7-8217-5254009d0812_1
92fd393040a0        gcr.io/google_containers/heapster-influxdb-amd64      "influxd --config ..."   5 minutes ago       Up 5 minutes                            k8s_influxdb_influxdb-grafana-bbtbp_kube-system_95e89d49-d1c8-11e7-8217-5254009d0812_1
bbed847c5c90        459944ce8cc4                                          "/dnsmasq-nanny -v..."   5 minutes ago       Up 5 minutes                            k8s_dnsmasq_kube-dns-6fc954457d-jp2lx_kube-system_96b7a4be-d1c8-11e7-8217-5254009d0812_1
a2bfd21ecaba        512cd7425a73                                          "/kube-dns --domai..."   5 minutes ago       Up 5 minutes                            k8s_kubedns_kube-dns-6fc954457d-jp2lx_kube-system_96b7a4be-d1c8-11e7-8217-5254009d0812_1
ed6e6b7da908        0a951668696f                                          "/opt/kube-addons.sh"    5 minutes ago       Up 5 minutes                            k8s_kube-addon-manager_kube-addon-manager-minikube_kube-system_9831e93c3188555873fdb49f43198eef_1
15f60f758efc        gcr.io/google_containers/pause-amd64:3.0              "/pause"                 5 minutes ago       Up 5 minutes                            k8s_POD_registry-69vtc_kube-system_96f56599-d1c8-11e7-8217-5254009d0812_1
821ba33296ea        gcr.io/google_containers/pause-amd64:3.0              "/pause"                 5 minutes ago       Up 5 minutes                            k8s_POD_nginx-ingress-controller-shg6v_kube-system_96338c84-d1c8-11e7-8217-5254009d0812_1
ed37b2890edc        gcr.io/google_containers/pause-amd64:3.0              "/pause"                 5 minutes ago       Up 5 minutes                            k8s_POD_default-http-backend-7wvbt_kube-system_961b9a84-d1c8-11e7-8217-5254009d0812_1
5b66b6c09b3d        gcr.io/google_containers/pause-amd64:3.0              "/pause"                 5 minutes ago       Up 5 minutes                            k8s_POD_kubernetes-dashboard-8s7nm_kube-system_95869efb-d1c8-11e7-8217-5254009d0812_1
875790040a43        gcr.io/google_containers/pause-amd64:3.0              "/pause"                 5 minutes ago       Up 5 minutes                            k8s_POD_influxdb-grafana-bbtbp_kube-system_95e89d49-d1c8-11e7-8217-5254009d0812_1
993e14c4676f        gcr.io/google_containers/pause-amd64:3.0              "/pause"                 5 minutes ago       Up 5 minutes                            k8s_POD_kube-addon-manager-minikube_kube-system_9831e93c3188555873fdb49f43198eef_1
8f119b7e3404        gcr.io/google_containers/pause-amd64:3.0              "/pause"                 5 minutes ago       Up 5 minutes                            k8s_POD_heapster-t9p9l_kube-system_95c37352-d1c8-11e7-8217-5254009d0812_1
6e89bade0932        gcr.io/google_containers/pause-amd64:3.0              "/pause"                 5 minutes ago       Up 5 minutes                            k8s_POD_kube-dns-6fc954457d-jp2lx_kube-system_96b7a4be-d1c8-11e7-8217-5254009d0812_1

The localkube was started properly:

$ ps aux | grep localkube
root      2900 10.1  7.0 11791216 420132 ?     Ssl  10:06   1:30 /usr/local/bin/localkube --v 10 --network-plugin=cni --dns-domain=cluster.local --node-ip=192.168.42.227 --extra-config=kubelet.container-runtime=remote --extra-config=kubelet.container-runtime-endpoint=/var/run/crio.sock --extra-config=kubelet.image-service-endpoint=/var/run/crio.sock --generate-certs=false --logtostderr=true --enable-dns=false

Also crio was was started:

$ ps aux | grep cri
root      2606  0.0  0.6 296384 37236 ?        Ssl  10:06   0:00 /usr/bin/crio --storage-driver=overlay2 --log-level=debug --insecure-registry 10.0.0.0/24 --root /mnt/sda1/var/lib/containers

So stopped docker:

$ sudo systemctl stop docker

And outside the minikube VM:

$ kubectl get events -w
LAST SEEN                       FIRST SEEN                      COUNT     NAME                        KIND      SUBOBJECT   TYPE      REASON                         SOURCE                 MESSAGE
2017-11-27 17:21:23 +0530 IST   2017-11-27 15:36:23 +0530 IST   106       minikube.14fae956b32ae2e4   Node                  Warning   FailedToStartNodeHealthcheck   kube-proxy, minikube   Failed to start node healthz on 0: listen tcp: address 0: missing port in address
2017-11-27 17:21:23 +0530 IST   2017-11-27 15:57:23 +0530 IST   85        minikube.14faea7bf4b520c0   Node                  Warning   ContainerGCFailed              kubelet, minikube      rpc error: code = Unknown desc = Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
^C

Output of minikube logs (if applicable):

https://gist.github.com/surajssd/18ef77c8efb8b7a0cfa8c2ede786b51a#file-minikube_logs-log

kinbug

All 2 comments

The docs are incorrect, sorry!

You'll need a --bootstrapper=kubeadm flag as well if you want to set the container runtime through the extra config flag.

Or, you can use the convenience flag alone, which does the same thing
--container-runtime=cri-o

@r2d4 works for me :-) Thanks

Was this page helpful?
0 / 5 - 0 ratings