Replies: 1 comment 9 replies
-
It seems the problem is the When I install Is there a plan to have a page describing the necessary prerequisites / minimal setup for using K3s with CRI-O? That https://devopstales.github.io/kubernetes/k3s-crio/ seems to come from https://github.com/devopstales/devopstales.github.io but looking at the open issues there like devopstales/devopstales.github.io#30, it does not seem to be actively maintained ... |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Environmental Info:
K3s Version:
Node(s) CPU architecture, OS, and Version:
Cluster Configuration:
Single node, control-plane,master.
Describe the bug:
I try to setup K3s with CRI-O, for CI purposes in a GitHub Actions runner. I follow the spirit of https://devopstales.github.io/kubernetes/k3s-crio/ (referenced from #2741 (comment)), although many things need to be done differently.
The containers gets setup properly and the node is shown as
Ready
, but attempts to run a Pod (sometimes even Pods likecoredns*
) often take many attempts to start, producing errors likeSteps To Reproduce:
export CRIO_VERSION=v1.31
curl -fsSL https://pkgs.k8s.io/addons:/cri-o:/stable:/$CRIO_VERSION/deb/Release.key | gpg --dearmor | sudo tee /etc/apt/keyrings/cri-o-apt-keyring.gpg > /dev/null
echo "deb [signed-by=/etc/apt/keyrings/cri-o-apt-keyring.gpg] https://pkgs.k8s.io/addons:/cri-o:/stable:/$CRIO_VERSION/deb/ /" | sudo tee /etc/apt/sources.list.d/cri-o.list
sudo apt update
sudo apt install -y cri-o
sudo cp /etc/cni/net.d/10-crio-bridge.conflist.disabled /etc/cni/net.d/10-crio-bridge.conflist
sudo vi /etc/cni/net.d/10-crio-bridge.conflist
and edit the file to containsudo apt install -y containernetworking-plugins
( echo '[crio.network]' ; echo 'plugin_dir = "/usr/lib/cni"' ) | sudo tee /etc/crio/crio.conf.d/20-cni.conf
sudo systemctl start crio.service
sudo modprobe br_netfilter
sudo sysctl -w net.ipv4.ip_forward=1
export K3S_KUBECONFIG_MODE=644
export INSTALL_K3S_EXEC=" --container-runtime-endpoint /var/run/crio/crio.sock --disable servicelb --disable traefik
curl -sfL https://get.k3s.io | sh -
kubectl get nodes
shows the node asReady
.kubectl run nginx --image=nginx
kubectl get pod/nginx
shows it asContainerCreating
for quite a long time.sudo journalctl -fl | grep -E 'veth|cni'
Expected behavior:
No errors in the journal, Pod
Running
immediatelly (especially when doing it the second time when the image has already been pulled from the registry).Actual behavior:
kubectl get pod/nginx
shows the Pod asContainerCreating
for quite a long time.Journal showing messages like
every cca 11 seconds, before settling down with
and the Pod finally gets
Running
.Additional context / logs:
I'm not sure if the
ranges
subnet
in the/etc/cni/net.d/10-crio-bridge.conflist
should be matched with--cluster-cidr
but even if I do that, the result is still the same.Beta Was this translation helpful? Give feedback.
All reactions