kubeadm: with containerd v2 'kubeadm init' reports 'detected that the sandbox image "" of the container runtime is inconsistent with that used by kubeadm'
What happened?
Installing Kubernetes v1.32 with containerd v2.0.1, runc v1.2.3 and cni_plugins v1.6.1. /etc/containerd/config.toml is just the output of /usr/local/bin/containerd config default
kubadm init succeeds, but reports:
W0105 15:55:18.584951 7068 checks.go:846] detected that the sandbox image "" of the container runtime is inconsistent with that used by kubeadm.It is recommended to use "registry.k8s.io/pause:3.10" as the CRI sandbox image.
It seems to read something that containerd v2 no longer provides.
What did you expect to happen?
kubadm init succeeds with no warning regarding sandbox image
How can we reproduce it (as minimally and precisely as possible)?
Install containerd, runc, cni_plugins and kubeadm.
/root/kubernetes.init.conf:
apiVersion: kubeadm.k8s.io/v1beta4
kind: InitConfiguration
---
apiVersion: kubeadm.k8s.io/v1beta4
kind: ClusterConfiguration
networking:
podSubnet: 10.244.0.0/16
serviceSubnet: 10.96.0.0/16
---
apiVersion: kubeproxy.config.k8s.io/v1alpha1
kind: KubeProxyConfiguration
mode: nftables
# kubeadm init --config=/root/kubernetes.init.conf
Anything else we need to know?
No response
Kubernetes version
$ kubectl version
Client Version: v1.32.0
Kustomize Version: v5.5.0
Server Version: v1.32.0
Cloud provider
None. Installing on VMs.
OS version
# On Linux:
$ cat /etc/os-release
NAME="Red Hat Enterprise Linux"
VERSION="9.4 (Plow)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="9.4"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Red Hat Enterprise Linux 9.4 (Plow)"
ANSI_COLOR="0;31"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:redhat:enterprise_linux:9::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9"
BUG_REPORT_URL="https://issues.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 9"
REDHAT_BUGZILLA_PRODUCT_VERSION=9.4
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.4"
$ uname -a
Linux kubmaster1.my.domain 5.14.0-427.42.1.el9_4.x86_64 kubernetes/kubernetes#1 SMP PREEMPT_DYNAMIC Fri Oct 18 14:35:40 EDT 2024 x86_64 x86_64 x86_64 GNU/Linux
</details>
### Install tools
<details>
</details>
### Container runtime (CRI) and version (if applicable)
<details>
containerd v2.0.1
</details>
### Related plugins (CNI, CSI, ...) and versions (if applicable)
<details>
runc v1.2.3
cni_plugins v1.6.1
</details>
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 25 (14 by maintainers)
related-to: https://github.com/containerd/containerd/issues/11117
As a quick resolution, we can fix the
/etc/containerd/config.tomlfile and refer to the correct sandbox image.that does seem like the problem. the bug is in containerd.
We may wait for https://github.com/containerd/containerd/pull/11114 then. That seems to be the valid fix.
Since
crictl infodoes not expose thesandboxImage, a workaround is usingcrictl inspecti -o json registry.k8s.io/pause:3.10 | jq .status.pinnedto filter the pinned image. This is a way to check if the current configured pause image is pinned in container runtime. But, as the check is in preflight, the image is not pulled yet. This is a little tricky and may not be the correct solution.