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

Crictl not contained in kubeadm and kubelet snaps, not obvious how to install it #992

Closed
ghost opened this issue Jul 15, 2018 · 12 comments
Closed

Comments

@ghost
Copy link

ghost commented Jul 15, 2018

Crictl is not contained in kubeadm and kubelet snaps leading to the error [ERROR FileExisting-crictl]: crictl not found in system path, and it's not obvious how to install it. Some people claim go get github.com/kubernetes-incubator/cri-tools/cmd/crictl fixes it, but that runs through without an error for me and I still get the preflight error.

Therefore, I suggest that if you're involved in packaging the snaps (or even if not) you help them address this issue somehow.

Versions

kubeadm version (use kubeadm version):

# kubeadm version
kubeadm version: &version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.0", GitCommit:"91e7b4fd31fcd3d5f436da26c980becec37ceefe", GitTreeState:"clean", BuildDate:"2018-06-27T20:14:41Z", GoVersion:"go1.10.2", Compiler:"gc", Platform:"linux/amd64"}

snap version / snap info kubeadm:

# snap info kubeadm
name:      kubeadm
summary:   easily bootstrap a secure Kubernetes cluster
publisher: canonical
contact:   snappy-canonical-storeaccount@canonical.com
license:   unknown
description: |
  easily bootstrap a secure Kubernetes cluster
commands:
  - kubeadm
snap-id:      QwW3AXRUWqQDuZKdaCDQqiGKH4K3Cr5w
tracking:     stable
refresh-date: today at 13:57 CEST
channels:                           
  stable:         1.11.0 (448) 11MB classic
  candidate:      1.11.0 (448) 11MB classic
  beta:           1.11.0 (448) 11MB classic
  edge:           1.11.0 (448) 11MB classic
  1.10/stable:    1.10.5 (447) 24MB classic
  1.10/candidate: 1.10.5 (457) 24MB classic
  1.10/beta:      1.10.5 (457) 24MB classic
  1.10/edge:      1.10.5 (457) 24MB classic
  1.11/stable:    1.11.0 (448) 11MB classic
  1.11/candidate: 1.11.0 (448) 11MB classic
  1.11/beta:      1.11.0 (448) 11MB classic
  1.11/edge:      1.11.0 (448) 11MB classic
  1.6/stable:     1.6.13 (234) 11MB classic
  1.6/candidate:  1.6.13 (234) 11MB classic
  1.6/beta:       1.6.13 (234) 11MB classic
  1.6/edge:       1.6.13 (234) 11MB classic
  1.7/stable:     1.7.16 (396) 12MB classic
  1.7/candidate:  1.7.16 (396) 12MB classic
  1.7/beta:       1.7.16 (396) 12MB classic
  1.7/edge:       1.7.16 (396) 12MB classic
  1.8/stable:     1.8.15 (456) 21MB classic
  1.8/candidate:  1.8.15 (456) 21MB classic
  1.8/beta:       1.8.15 (456) 21MB classic
  1.8/edge:       1.8.15 (456) 21MB classic
  1.9/stable:     1.9.9  (445) 23MB classic
  1.9/candidate:  1.9.9  (445) 23MB classic
  1.9/beta:       1.9.9  (445) 23MB classic
  1.9/edge:       1.9.9  (445) 23MB classic
installed:        1.11.0 (448) 11MB classic

Environment:

  • Kubernetes version (use kubectl version):
  • Cloud provider or hardware configuration: hetzner cloud
  • OS Ubuntu 18.04 LTS
  • Kernel (e.g. uname -a): Linux kubernetes-test-1 4.15.0-23-generic #25-Ubuntu SMP Wed May 23 18:02:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

What happened?

# kubeadm init
I0715 14:39:34.435856   10931 feature_gate.go:230] feature gates: &{map[]}
[init] using Kubernetes version: v1.11.0
[preflight] running pre-flight checks
	[WARNING Service-Docker]: docker service is not enabled, please run 'systemctl enable docker.service'
	[WARNING FileExisting-socat]: socat not found in system path
I0715 14:39:34.505805   10931 kernel_validator.go:81] Validating kernel version
I0715 14:39:34.506016   10931 kernel_validator.go:96] Validating kernel config
	[WARNING SystemVerification]: docker version is greater than the most recently validated version. Docker version: 17.12.1-ce. Max validated version: 17.03
	[WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'
[preflight] Some fatal errors occurred:
	[ERROR FileExisting-crictl]: crictl not found in system path
	[ERROR Port-10250]: Port 10250 is in use
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`

What you expected to happen?

It works, or it is more obvious how to install crictl:

# snap install crictl
error: snap "crictl" not found
# apt install crictl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package crictl

How to reproduce it (as minimally and precisely as possible)?

Install Ubuntu 18.04 LTS, then:

apt update --fix-missing && apt upgrade -y
apt install -y docker.io daemonize
snap install --classic kubelet
daemonize kubelet
snap install --classic kubeadm
kubeadm init

(sorry if I forgot a step, but it should be pretty complete)

Anything else we need to know?

@neolit123
Copy link
Member

snap is not supported.

i think the packaged binaries you are using are done by a third party, because the official packages should include crictl:
https://kubernetes.io/docs/tasks/tools/install-kubeadm/#installing-kubeadm-kubelet-and-kubectl

@dims
Copy link
Member

dims commented Jul 15, 2018

when you do go get check where the generated binary is placed. typically it's in $GOPATH/bin/ directory. Then ensure that the directory is in your PATH and see if that helps

@bart0sh
Copy link

bart0sh commented Jul 16, 2018

@ALL This is yet another example of user confusion caused by artificial dependency to crictl. Most of users don't have CRI configured, but kubeadm still insists on installng crictl, which is absolutely not needed in such a cases.

@neolit123
Copy link
Member

but how would the kubelet work if the user doesn't have a CRI configured?

right now, kubeadm uses crictl for pulling images and it's going to be used for more things in the future -
therefore the dependency in 1.11.
if it's not part of our 1.11 debs and rpms i think we should fix that.

@bart0sh
Copy link

bart0sh commented Jul 16, 2018

but how would the kubelet work if the user doesn't have a CRI configured?

It will work with docker. So far it has been most usable scenario. The confusion I'm talking about was started when kubeadm started to require crictl installed on the system.

@embik
Copy link
Member

embik commented Jul 16, 2018

Considering CoreOS is a supported platform (at least kubeadm documentation prominently features it) and crictl is not easily available on it, this change could have been communicated better IMHO. It should have been mentioned in the Changelog at the very least (only mentions the packages ship it now).

The last comment available on this very topic is this which indicates the check is not being promoted to an error in my eyes.

@bart0sh
Copy link

bart0sh commented Jul 17, 2018

@Jonast This issue should be at least partly fixed by this PR. Can you test the latest master code to confirm that it's fixed?

@ghost
Copy link
Author

ghost commented Jul 17, 2018

The only kubernetes install paths I'm familiar with is apt (which has it packaged) and snap (which I don't know how to update to the latest master), both combined with kubeadm, so I'm not fully sure how to do that

@bart0sh
Copy link

bart0sh commented Jul 17, 2018

@Jonast never mind then. I'll test it after this PR is approved.

@neolit123
Copy link
Member

neolit123 commented Jul 17, 2018

@Jonast
how about downloading cri-tools from here and copying the crictl binary to /usr/bin:
https://github.com/kubernetes-incubator/cri-tools/releases

this is the file for your system:
crictl-v1.11.1-linux-amd64.tar.gz

@ghost
Copy link
Author

ghost commented Jul 17, 2018

@neolit123 I did manage to install it by copying it over from the go get compilation, so I'm no longer "stuck". Thanks for the help though!

@neolit123
Copy link
Member

thank you. good to know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants