Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

containerd: failed to run kubelet: unknown service runtime.v1alpha2.RuntimeService #3471

Closed
fvoznika opened this issue Dec 18, 2018 · 7 comments
Labels
co/kubelet Kubelet config issues co/runtime/containerd kind/bug Categorizes issue or PR as related to a bug.

Comments

@fvoznika
Copy link
Contributor

fvoznika commented Dec 18, 2018

BUG REPORT

Environment:

minikube version: v0.30.0

OS:
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

VM driver:
"DriverName": "kvm2",

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

What happened:

Error running:

minikube start --container-runtime=containerd --docker-opt containerd=/var/run/containerd/containerd.sock --network-plugin=cni --vm-driver=kvm2

How to reproduce it (as minimally and precisely as possible):
Not really sure how to get into this state, but once it does, minikube cannot start anymore.

Output of minikube logs (if applicable):
minikube start output:

There is a newer version of minikube available (v0.31.0).  Download it here:
https://github.com/kubernetes/minikube/releases/tag/v0.31.0

To disable this notification, run the following:
minikube config set WantUpdateNotification false
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
Downloading Minikube ISO
 170.78 MB / 170.78 MB [============================================] 100.00% 0s
Getting VM IP address...
Moving files into cluster...
Downloading kubeadm v1.10.0
Downloading kubelet v1.10.0
Finished Downloading kubelet v1.10.0
Finished Downloading kubeadm v1.10.0
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
E1218 21:15:31.001185   16529 start.go:297] Error starting cluster:  kubeadm init error 
sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests --ignore-preflight-errors=DirAvailable--data-minikube --ignore-preflight-errors=Port-10250 --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-etcd.yaml --ignore-preflight-errors=Swap --ignore-preflight-errors=CRI  &&
sudo /usr/bin/kubeadm alpha phase addon kube-dns
 running command: : running command: 
sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --ignore-preflight-errors=DirAvailable--etc-kubernetes-manifests --ignore-preflight-errors=DirAvailable--data-minikube --ignore-preflight-errors=Port-10250 --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml --ignore-preflight-errors=FileAvailable--etc-kubernetes-manifests-etcd.yaml --ignore-preflight-errors=Swap --ignore-preflight-errors=CRI  &&
sudo /usr/bin/kubeadm alpha phase addon kube-dns

.: Process exited with status 1

minikube.log
Last few lines from minikube logs

Dec 18 21:20:10 minikube kubelet[3417]: I1218 21:20:10.822392    3417 remote_runtime.go:43] Connecting to runtime service unix:///run/containerd/containerd.sock
Dec 18 21:20:10 minikube kubelet[3417]: E1218 21:20:10.824433    3417 remote_runtime.go:69] Version from runtime service failed: rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService
Dec 18 21:20:10 minikube kubelet[3417]: E1218 21:20:10.824826    3417 kuberuntime_manager.go:172] Get runtime version failed: rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService
Dec 18 21:20:10 minikube kubelet[3417]: F1218 21:20:10.824973    3417 server.go:233] failed to run Kubelet: failed to create kubelet: rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService

minikube ssh

$ sudo /usr/bin/kubeadm init --config /var/lib/kubeadm.yaml --skip-preflight-checks
Flag --skip-preflight-checks has been deprecated, it is now equivalent to --ignore-preflight-errors=all
[init] Using Kubernetes version: v1.10.0
[init] Using Authorization modes: [Node RBAC]
[preflight] Running pre-flight checks.
	[WARNING SystemVerification]: docker version is greater than the most recently validated version. Docker version: 17.12.1-ce. Max validated version: 17.03
	[WARNING FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml]: /etc/kubernetes/manifests/kube-apiserver.yaml already exists
	[WARNING FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml]: /etc/kubernetes/manifests/kube-controller-manager.yaml already exists
	[WARNING FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml]: /etc/kubernetes/manifests/kube-scheduler.yaml already exists
	[WARNING FileAvailable--etc-kubernetes-manifests-etcd.yaml]: /etc/kubernetes/manifests/etcd.yaml already exists
	[WARNING Swap]: running with swap on is not supported. Please disable swap
Flag --admission-control has been deprecated, Use --enable-admission-plugins or --disable-admission-plugins instead. Will be removed in a future version.
[certificates] Using the existing ca certificate and key.
[certificates] Using the existing apiserver certificate and key.
[certificates] Using the existing apiserver-kubelet-client certificate and key.
[certificates] Using the existing etcd/ca certificate and key.
[certificates] Using the existing etcd/server certificate and key.
[certificates] Using the existing etcd/peer certificate and key.
[certificates] Using the existing etcd/healthcheck-client certificate and key.
[certificates] Using the existing apiserver-etcd-client certificate and key.
[certificates] Using the existing sa key.
[certificates] Using the existing front-proxy-ca certificate and key.
[certificates] Using the existing front-proxy-client certificate and key.
[certificates] Valid certificates and keys now exist in "/var/lib/minikube/certs/"
[kubeconfig] Using existing up-to-date KubeConfig file: "/etc/kubernetes/admin.conf"
[kubeconfig] Using existing up-to-date KubeConfig file: "/etc/kubernetes/kubelet.conf"
[kubeconfig] Using existing up-to-date KubeConfig file: "/etc/kubernetes/controller-manager.conf"
[kubeconfig] Using existing up-to-date KubeConfig file: "/etc/kubernetes/scheduler.conf"
[controlplane] Wrote Static Pod manifest for component kube-apiserver to "/etc/kubernetes/manifests/kube-apiserver.yaml"
[controlplane] Wrote Static Pod manifest for component kube-controller-manager to "/etc/kubernetes/manifests/kube-controller-manager.yaml"
[controlplane] Wrote Static Pod manifest for component kube-scheduler to "/etc/kubernetes/manifests/kube-scheduler.yaml"
[etcd] Wrote Static Pod manifest for a local etcd instance to "/etc/kubernetes/manifests/etcd.yaml"
[init] Waiting for the kubelet to boot up the control plane as Static Pods from directory "/etc/kubernetes/manifests".
[init] This might take a minute or longer if the control plane images have to be pulled.
[kubelet-check] It seems like the kubelet isn't running or healthy.
[kubelet-check] The HTTP call equal to 'curl -sSL http://localhost:10255/healthz' failed with error: Get http://localhost:10255/healthz: dial tcp 127.0.0.1:10255: getsockopt: connection refused.

minikube delete && rm -rf .minikube && rm -rf .kube doesn't fix the problem. minikube start --vm-driver=kvm2 works.

@tstromberg
Copy link
Contributor

Here's the call where kubelet kills itself:

Dec 18 21:20:00 minikube kubelet[3391]: F1218 21:20:00.445512 3391 server.go:233] failed to run Kubelet: failed to create kubelet: rpc error: code = Unimplemented desc = unknown service runtime.v1alpha2.RuntimeService

@tstromberg tstromberg changed the title minikube start fails constantly with containerd containerd: failed to run kubelet: unknown service runtime.v1alpha2.RuntimeService Dec 18, 2018
@tstromberg tstromberg added kind/bug Categorizes issue or PR as related to a bug. co/kubelet Kubelet config issues co/runtime/containerd labels Dec 18, 2018
@tstromberg
Copy link
Contributor

I haven't tried yet, but I wonder if setting --kubernetes-version=v1.12.3 changes this outcome at all.

@priyawadhwa
Copy link

I tried to help @fvoznika debug this, and after upgrading to v0.31.0 it's working now. I think #3343 was required for containerd to start up properly.

@fvoznika
Copy link
Contributor Author

It's working with v0.31.0. Thanks Priya for the help!

@CivenResun
Copy link

commenting out disabled_plugins = ["cri"] is feasible

@CivenResun
Copy link

commenting out disabled_plugins = ["cri"] is feasible

in /etc/containerd/config.toml

@CivenResun
Copy link

commenting out disabled_plugins = ["cri"] is feasible

in /etc/containerd/config.toml

Refer to this link https ://github.com/containerd/containerd/issues/4581

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/kubelet Kubelet config issues co/runtime/containerd kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

4 participants