nydus icon indicating copy to clipboard operation
nydus copied to clipboard

update for containerd version = 3 config

Open imeoer opened this issue 1 month ago • 2 comments

Configure nydus snapshotter addr (for all containerd versions):

[proxy_plugins]
  [proxy_plugins.nydus]
    type = "snapshot"
    address = "/run/containerd-nydus/containerd-nydus-grpc.sock"

For containerd v1.x version = 1 config:

[plugins.cri]
  [plugins.cri.containerd]
    snapshotter = "nydus"
    disable_snapshot_annotations = false
    discard_unpacked_layers = false

For containerd v1.x version = 2 config:

[plugins."io.containerd.grpc.v1.cri".containerd]
   snapshotter = "nydus"
   disable_snapshot_annotations = false
   discard_unpacked_layers = false

For containerd v2.x version = 3 config:

[plugins]
  [plugins.'io.containerd.cri.v1.images']
    snapshotter = 'nydus'
    disable_snapshot_annotations = false
    discard_unpacked_layers = false

imeoer avatar Nov 18 '25 07:11 imeoer

We should validate the version = 3 config is work for containerd v2.x and update the doc.

imeoer avatar Nov 18 '25 07:11 imeoer

@imeoer if that helps, I'm running containerd v2.1 with version = 3 of the config file and my nydus-specific config looks like this:

version = 3

[proxy_plugins]
  [proxy_plugins.nydus]
    type = "snapshot"
    # Required by the kubelet's imageServiceEndpoint
    address = "/run/containerd/image-service.sock"

  [proxy_plugins.nydus.exports]
    enable_remote_snapshot_annotations = "true"

[plugins]
  # Use nydus snapshotter through CRI
  [plugins."io.containerd.cri.v1.images"]
    snapshotter = "nydus"

	[plugins."io.containerd.cri.v1.images".pinned_images]
  	# need sandbox_image entry here otherwise it's overwritten when importing the file
  	# sandbox_image is the image used by sandbox container.
  	sandbox = "{{ pause_image }}"

  # Use nydus snapshotter through containerd transfer service (not necessary if you don't use the transfer service)
  [[plugins."io.containerd.transfer.v1.local".unpack_config]]
    snapshotter = "nydus"
    # need platform entry here otherwise there is no default used in containerd
    platform = "{{ target_platform }}"

  # This is the default entry, which is removed if we specify another one, so we need to add it back explicitely
  [[plugins."io.containerd.transfer.v1.local".unpack_config]]
    snapshotter = "overlayfs"
    platform = "{{ target_platform }}"
    differ = ""

Fricounet avatar Nov 20 '25 17:11 Fricounet