k3s icon indicating copy to clipboard operation
k3s copied to clipboard

Bump Containerd to 2.1 to support OCI image volumes

Open melinda-mytra opened this issue 6 months ago • 1 comments

Is your feature request related to a problem? Please describe. We specifically want to use OCI image volumes in k3s and cannot because it's only included in Containerd 2.1

Describe the solution you'd like Bump Containerd to 2.1.1

Describe alternatives you've considered Do a separate install of containerd and manage it apart from K3s.

melinda-mytra avatar May 23 '25 20:05 melinda-mytra

We generally wait a couple patch releases before using new minor releases of upstream projects, as there are inevitably various bugs that take time to work out. See for example the pod sandbox store corruption issue with containerd 2.0, or the recent CVE in containerd 2.1.

brandond avatar May 23 '25 20:05 brandond

any update on upgrading k3s with latest containerd 2.1.4

marselr avatar Aug 19 '25 10:08 marselr

We're currently looking at doing so for September

cwayne18 avatar Aug 19 '25 11:08 cwayne18

Validate in v1.34.0+k3s1 and leave the issue open until backports are validated.

ShylajaDevadiga avatar Sep 08 '25 22:09 ShylajaDevadiga

Mounting works but I didn't manage to get the subpath property to work. Amazing progress nonetheless!!!

LaurentGoderre avatar Sep 11 '25 14:09 LaurentGoderre

Validated on release-1.34 branch with version v1.34.1-rc1+rke2r1

Environment Details

Infrastructure

  • [x] Cloud
  • [ ] Hosted

Node(s) CPU architecture, OS, and Version:

$ cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04 LTS"

$ uname -m
x86_64

Cluster Configuration:

1 server/ 1 agent

Config.yaml:

token: xxxx
cluster-init: true
write-kubeconfig-mode: "0644"
node-external-ip: 1.1.1.1
node-label:
- k3s-upgrade=server

Testing Steps

  1. Copy config.yaml
$ sudo mkdir -p /etc/rancher/k3s && sudo cp config.yaml /etc/rancher/k3s
  1. Install k3s
curl -sfL https://get.k3s.io | sudo INSTALL_K3S_VERSION='v1.34.1-rc1+k3s1' sh -s - server
  1. Verify Cluster Status:
kubectl get nodes -o wide
kubectl get pods -A

Validation Results:

  • k3s version used for validation:
$ k3s -v 
k3s version v1.34.1-rc1+k3s1 (24fc436e)
go version go1.24.6
$ sudo /usr/local/bin/kubectl --kubeconfig /etc/rancher/k3s/k3s.yaml get node -o yaml | grep containerd -A1
DEBU[0000] Asset dir /var/lib/rancher/k3s/data/<redacted>
DEBU[0000] Running /var/lib/rancher/k3s/data/<redacted>/bin/kubectl [kubectl --kubeconfig /etc/rancher/k3s/k3s.yaml get node -o yaml]
      containerRuntimeVersion: containerd://2.1.4-k3s2
      kernelVersion: 6.8.0-1012-aws
--
      containerRuntimeVersion: containerd://2.1.4-k3s2
      kernelVersion: 6.8.0-1012-aws

aganesh-suse avatar Sep 16 '25 19:09 aganesh-suse

Mounting works but I didn't manage to get the subpath property to work. Amazing progress nonetheless!!!

@LaurentGoderre , that's because it's not until 2.2 that containerd gets subpath support.

AntonOfTheWoods avatar Nov 02 '25 09:11 AntonOfTheWoods