Bug 2110153

Summary: kubeadm requires crictl (cri-tools)
Product: [Fedora] Fedora Reporter: hiraku.sugiura
Component: kubernetesAssignee: Anthony Rabbito <hello>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 36CC: bradley.g.smith, eparis, go-sig, hello, jbrooks, jcajka, jchaloup, maxwell, quirin.maier, stclairt, strigazi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 1.24.3-3 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-25 23:25:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description hiraku.sugiura 2022-07-24 01:20:13 UTC
Please add crictl as dependecies to kubernetes-kubeadm.
I can not  execute "kubeadm init" for now.

Comment 1 Brad Smith 2022-07-24 15:02:48 UTC
Could you please provide an example of the error or response you see from 'kubeadm init'?

Comment 2 hiraku.sugiura 2022-07-25 02:24:03 UTC
Steps to Reproduce:

# Install Fedora 36
...
$ sudo dnf install kubernetes-node kubernetes-kubeadm
...
$ sudo systemctl enable --now kubelet.service
Created symlink /etc/systemd/system/multi-user.target.wants/kubelet.service → /usr/lib/systemd/system/kubelet.service.
$ sudo emacs /etc/sysctl.d/k8s.conf
$ sudo cat /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables  = 1
net.ipv4.ip_forward                 = 1
$ sudo systemctl reboot
...
$ sudo kubeadm init
[sudo] user のパスワード:
[init] Using Kubernetes version: v1.24.3
[preflight] Running pre-flight checks
W0725 11:20:12.809863    1517 checks.go:1021] [preflight] WARNING: Couldn't create the interface used for talking to the container runtime: crictl is required by the container runtime: exec: "crictl": executable$
        [WARNING Firewalld]: firewalld is active, please ensure ports [6443 10250] are open or your cluster may not function correctly
        [WARNING Swap]: swap is enabled; production deployments should disable swap unless testing the NodeSwap feature gate of the kubelet
        [WARNING SystemVerification]: missing optional cgroups: blkio
error execution phase preflight: [preflight] Some fatal errors occurred:
        [ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables does not exist
        [ERROR FileExisting-crictl]: crictl not found in system path <==================================================================== THIS ISSUE
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
To see the stack trace of this error execute with --v=5 or higher


Ref:
https://github.com/kubernetes/kubeadm/issues/1059

Comment 3 Anthony Rabbito 2022-07-25 14:44:02 UTC
It looks like crictl isn't currently packaged. I would think this should usually be a dependency on containerd/cri-o but maybe there's usecases where they don't need it. Either way we will need to get it packaged for Kubernetes.

Comment 4 Anthony Rabbito 2022-07-25 15:29:40 UTC
cri-tools does exist in Fedora. Max plans on getting it up to date today.

Comment 5 Brad Smith 2022-08-17 20:07:34 UTC
Added requires for kubernetes-kubeadm rpm in version 1.24.3-3. Should show up in  rawhide tomorrow (18 Aug 2022).