Skip to content

CKS: node bootstrap drops the private registry and pause image on containerd 2.x #14896

Backlog

Description

@bhouse-nexthop

Problem

CKS node bootstrap only works with containerd 1.x config files. On a node template with containerd 2.x:

  • The private registry is never added. The setup script inserts the mirror and credentials with sed after [plugins."io.containerd.grpc.v1.cri".registry], a config version 2 table. containerd 2.x writes config version 3 (version 4 on 2.4+), where that table is [plugins.'io.containerd.cri.v1.images'.registry], so the sed matches nothing and nothing reports it.
  • The pause image from the ISO is never set. sed "s|sandbox_image = .*|...|" only knows the version 2 key. On 2.x the key is sandbox under pinned_images, so containerd keeps its built-in registry.k8s.io/pause and an offline node tries to pull it. upgrade-kubernetes.sh has the same sed.

Also, runcmd always runs containerd config default > /etc/containerd/config.toml, so a template that ships its own containerd config loses it.

Why it matters

Kubernetes 1.35 is the last release that supports containerd 1.x, and containerd 1.7 is end of life. CKS clusters can't go past 1.35 until node bootstrap works with containerd 2.x.

Seen with

containerd Config version Registry with a private registry set Pause image
1.7.36 2 added set
2.4.2 4 dropped; pull goes to https:// and fails with server gave HTTP response to HTTPS client left at the default

Expected

Node bootstrap adds the registry and pause image on containerd 1.7 and 2.x, and keeps a template's own containerd config when it is already set up for Kubernetes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions