Install K3S with CRI-O and kadalu

In this post I will show you how to install cri-o container runtime and initialize a Kubernetes.

Parst of the K3S series

Install CRI-O instad of Docker

sudo curl -L -o /etc/yum.repos.d/devel_kubic_libcontainers_stable.repo
sudo curl -L -o /etc/yum.repos.d/devel_kubic_libcontainers_stable_cri-o_${VERSION}.repo${VERSION}/CentOS_7/devel:kubic:libcontainers:stable:cri-o:${VERSION}.repo

yum install cri-o


modprobe overlay
modprobe br_netfilter

cat <<EOF >  /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv4.ip_forward                 = 1
net.bridge.bridge-nf-call-ip6tables = 1

sysctl --system
free -h
swapoff -a
swapoff -a
sed -i.bak -r 's/(.+ swap .+)/#\1/' /etc/fstab
free -h

You nee the same cgroup manager in cri-o and kubeadm. The default for kubeadm is cgroupfs and for cri-o the default is systemd. In this example I configured cri-o for cgroupfs.

nano /etc/crio/crio.conf
cgroup_manager = "cgroupfs"
registries = [

Disable ipv6 and configure cri-o CNI confg for flanel’s network:

echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.conf
sysctl -p

sed -i "s|::1|#::1|" /etc/hosts

nano /etc/cni/net.d/100-crio-bridge.conf
"ipam": {
    "type": "host-local",
    "routes": [
        { "dst": "" }

    "ranges": [
        [{ "subnet": "" }]
systemctl enable --now cri-o

echo "export PATH=$PATH:/usr/local/bin/" >> /etc/profile
source /etc/profile

yum install -y container-selinux selinux-policy-base
rpm -i
export K3S_KUBECONFIG_MODE="644"
export INSTALL_K3S_EXEC=" --container-runtime-endpoint /var/run/crio/crio.sock --no-deploy servicelb --no-deploy traefik"

curl -sfL | sh -
systemctl status k3s

crictl info
crictl ps
kubectl get node -o wide
kubectl get pods -A -o wide