Kubeadm: [WARNING FileExisting-crictl]: crictl not found in system path

Created on 25 Dec 2017  ·  22Comments  ·  Source: kubernetes/kubeadm

kube version: 1.9.0

How to resolve this pre-flight check, what does this warning mean?

triaged

Most helpful comment

If kubeadm wants this cli tool it should install it if not present rather than warning. I suspect a very scarce minority of users will have crictl pre-installed!!

All 22 comments

It's just a warning, not an error. You should be able to proceed just fine without it.
If you want to get rid of the warning, just install https://github.com/kubernetes-incubator/cri-tools/tree/master/cmd/crictl

Thank you and have a good day!

@luxas Thanks a lot!

I've installed it, both through the "go get" method and by placing it directly in my PATH. The warning is still coming up. Is there some reason why it wouldn't be finding it?

I'll add a breadcrumb to the warning.

go get github.com/kubernetes-incubator/cri-tools/cmd/crictl resolves

@chuckha

If kubeadm wants this cli tool it should install it if not present rather than warning. I suspect a very scarce minority of users will have crictl pre-installed!!

Do we ship crictl in the official deb/rpm packages?

@errordeveloper nope, but we could.

Why is nothing mentioned about this in https://kubernetes.io/docs/setup/independent/install-kubeadm??

Should include something along the lines of what I had to do:
Install this go thing so you can build this other thing that kubeadm needs:

yum install go

Update it because nothing ever works without requiring more googling, so of course the version installed is too old:

rpm --import https://mirror.go-repo.io/centos/RPM-GPG-KEY-GO-REPO
curl -s https://mirror.go-repo.io/centos/go-repo.repo | tee /etc/yum.repos.d/go-repo.repo
vi /etc/yum.repos.d/go-repo.repo

Replace "$releasever" with "7" and "$basearch" with "x86_64", because, duh, those vars aren't gonna exist.

yum update golang

Build the thing:

go get github.com/kubernetes-incubator/cri-tools/cmd/crictl

Now try kubeadm init and deal with the other undocumented errors.

likewise on Ubuntu 16.4 .. the helpful suggestion of using "go get ..." was there, but that required an

sudo apt-get install golang-go

then you run the go-get command, and then it errors out because GOPATH isnt set, which I fixed, but then it complained because I used a relative path, which I fixed, but then it complained because

package context: unrecognized import path "context" (import path does not begin with hostname)

which turns out is because the latest version of golang that you can install using apt-get is 1.6, and the context fix is in 1.7 and above .. which requires a complete purge and reinstall using the friendly instructions here . which is nice even though they got the environment variable settings wrong .. (sigh) .. then I realise that 1.7 is really quite ancient, so I go back to the official instructions here .. though I'm still glad I have the wget instructions for downloading the tarball from the first helpful location .. which I modified to this

wget https://storage.googleapis.com/golang/go1.10.1.linux-amd64.tar.gz

just in case anyone else stumbles on this ...

I know this sounds like I'm whingeing (because I am which is because I'm a little annoyed) .. but I thought it was worth pointing out that its not as simple as just adding in an instruction to run

go get github.com/kubernetes-incubator/cri-tools/cmd/crictl

and believe that it will resolve the issue easily ... this kind of stuff probably shouldn't be pushed to the end users.

Provide what I met with this warning:

kubeadm version: &version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.2", GitCommit:"81753b10df112992bf51bbc2c2f85208aad78335", GitTreeState:"clean", BuildDate:"2018-04-27T09:10:24Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}

  1. --ignore-preflight-errors cannot mitigate this warning, I tried varies formats:
    --ignore-preflight-errors="cri" or --ignore-preflight-errors=cri or
    --ignore-preflight-errors "cri" or --ignore-preflight-errors cri

  2. install the package cannot mitigate this warning either

    go get github.com/kubernetes-incubator/cri-tools/cmd/crictl

    will install the binary in $HOME/go/bin, and I added it into $PATH
    and I installed the binary both as normal user and root (so it appears in both home directories).
    still kubeadm reports warning and cannot find it.

@heyi-arm --ignore-preflight-errors will convert error to warning, but warnings will still be shown.

Just chiming in here as well as I just ran into this when trying to provision a multi-master setup using Ansible.

TASK [ansible-k8s : join_cluster | Joining Additional Nodes To K8s Cluster] ******************************************************************************************************
fatal: [node1]: FAILED! => {"changed": true, "cmd": ["kubeadm", "join", "--token", "8gsm4e.uv0bve5j7ec2i0qk", "--discovery-token-unsafe-skip-ca-verification", "--ignore-preflight-errors", "192.168.250.10:6443"], "delta": "0:00:00.176311", "end": "2018-05-10 19:57:28.117885", "msg": "non-zero return code", "rc": 2, "start": "2018-05-10 19:57:27.941574", "stderr": "\t[WARNING FileExisting-crictl]: crictl not found in system path\nSuggestion: go get github.com/kubernetes-incubator/cri-tools/cmd/crictl\n[preflight] Some fatal errors occurred:\n\t[ERROR FileAvailable--etc-kubernetes-pki-ca.crt]: /etc/kubernetes/pki/ca.crt already exists\n[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`", "stderr_lines": ["\t[WARNING FileExisting-crictl]: crictl not found in system path", "Suggestion: go get github.com/kubernetes-incubator/cri-tools/cmd/crictl", "[preflight] Some fatal errors occurred:", "\t[ERROR FileAvailable--etc-kubernetes-pki-ca.crt]: /etc/kubernetes/pki/ca.crt already exists", "[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`"], "stdout": "[preflight] Running pre-flight checks.", "stdout_lines": ["[preflight] Running pre-flight checks."]}
fatal: [node2]: FAILED! => {"changed": true, "cmd": ["kubeadm", "join", "--token", "8gsm4e.uv0bve5j7ec2i0qk", "--discovery-token-unsafe-skip-ca-verification", "--ignore-preflight-errors", "192.168.250.10:6443"], "delta": "0:00:00.183138", "end": "2018-05-10 19:57:28.171885", "msg": "non-zero return code", "rc": 2, "start": "2018-05-10 19:57:27.988747", "stderr": "\t[WARNING FileExisting-crictl]: crictl not found in system path\nSuggestion: go get github.com/kubernetes-incubator/cri-tools/cmd/crictl\n[preflight] Some fatal errors occurred:\n\t[ERROR FileAvailable--etc-kubernetes-pki-ca.crt]: /etc/kubernetes/pki/ca.crt already exists\n[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`", "stderr_lines": ["\t[WARNING FileExisting-crictl]: crictl not found in system path", "Suggestion: go get github.com/kubernetes-incubator/cri-tools/cmd/crictl", "[preflight] Some fatal errors occurred:", "\t[ERROR FileAvailable--etc-kubernetes-pki-ca.crt]: /etc/kubernetes/pki/ca.crt already exists", "[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`"], "stdout": "[preflight] Running pre-flight checks.", "stdout_lines": ["[preflight] Running pre-flight checks."]}

@mrlesmithjr you have another issue, unrelated: [ERROR FileAvailable--etc-kubernetes-pki-ca.crt]: /etc/kubernetes/pki/ca.crt already exists. Please check your ansible playbook, and open new issue with details, if needed.

That is where I copied from the master the PKI folder. Still trying to sort all of it out. But will definitely do.

This is great feedback. I'll bring it up in sig-cluster-lifecycle. This should absolutely be ignorable at the very least.

And it should be .deb distributed if kubeadm depends on it. If not then it's just some optional utility - that should be packaged still.

If this is going to be required for install, then it needs to be shipped with the packages. Go build tools do not belong on production container hosts.

In my opinion it shouldn't be required unless user wants to use CRI instead of docker. It can be done either explicitly by introducing new command line option (--use-cri ?) or implicitly like in this PR when user specifies CRI socket using --cri-socket option.

@luxas for me this presents as an error. Is this a bug? If yes, then it should be fixed quickly, because as illustrated above, installing crictl isn't so easy on some configurations (and requires go build tools on the production host).

I think this should be fixed by this PR

Was this page helpful?
0 / 5 - 0 ratings