From 493335ec5e1b5f858c61a457d1a08cc69b38064b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Tue, 14 Oct 2025 19:58:17 +0200 Subject: [PATCH] Avoid relying on extra kubernetes packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The second-party package of "cri-tools" (crictl) and also the third-party package "kubernetes-cni" (cni-plugins) will go away. So don't rely on them being installed, but just use "ctr" and "/usr/local/libexec/cni" instead from the nerdctl-full install. Signed-off-by: Anders F Björklund --- templates/k8s.yaml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/templates/k8s.yaml b/templates/k8s.yaml index ab89cd86b61..57243bdd534 100644 --- a/templates/k8s.yaml +++ b/templates/k8s.yaml @@ -47,14 +47,6 @@ provision: echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v${VERSION}/deb/ /" | sudo tee /etc/apt/sources.list.d/kubernetes.list curl -fsSL https://pkgs.k8s.io/core:/stable:/v${VERSION}/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg apt-get update - # cri-tools - apt-get install -y cri-tools - cat < @@ -77,6 +69,8 @@ provision: runtime_type = "io.containerd.runc.v2" [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options] SystemdCgroup = true + [plugins."io.containerd.cri.v1.runtime".cni] + bin_dirs = ["/usr/local/libexec/cni","/opt/cni/bin"] EOF systemctl restart containerd # See @@ -140,7 +134,7 @@ probes: script: | #!/bin/bash set -eux -o pipefail - if ! timeout 30s bash -c "images=\"$(kubeadm config images list)\"; until for image in \$images; do sudo crictl image -q \$image | grep -q sha256; done; do sleep 3; done"; then + if ! timeout 30s bash -c "images=\"$(kubeadm config images list)\"; until for image in \$images; do sudo ctr -n k8s.io image inspect \$image >/dev/null; done; do sleep 3; done"; then echo >&2 "k8s images are not pulled yet" exit 1 fi