Installing / using CRI-O on Fedora CoreOS

You can rpm-ostree install cri-o but that might not be what you want. However you install kubernetes you’ll want your cri-o installation to come from those instructions and be lifecycled with kubernetes itself. We don’t have well defined/published directions for this right now.

Even package layering it is a bit convoluted right now because it’s delivered via a module and not in the default package set in the mirrors. In order to layer it you need to create a file to enable the cri-o stream and also enable the modular repos:

$ sudo su -
# mkdir /etc/dnf/modules.d
# cat <<EOF > /etc/dnf/modules.d/cri-o.module
[cri-o]
name=cri-o
stream=1.16
profiles=
state=enabled
EOF
# sed -i -z s/enabled=0/enabled=1/ /etc/yum.repos.d/fedora-modular.repo
# sed -i -z s/enabled=0/enabled=1/ /etc/yum.repos.d/fedora-updates-modular.repo
# rpm-ostree install cri-o 

NOTE: The -z in the sed command will make it only replace the first occurrence.

Obviously this isn’t ideal.

3 Likes