kubernetes/kops · error
error finding contained version
Error message
error finding contained version
What it means
After installing binaries, installContainerd reads the containerd version from NodeupConfig.ContainerdConfig.Version to build the systemd service. If NodeupConfig.ContainerdConfig is nil (no containerd config was rendered into the nodeup config), there is no version to use, and nodeup returns this typo'd error ('contained' instead of 'containerd') at nodeup/pkg/model/containerd.go:162.
Source
Thrown at nodeup/pkg/model/containerd.go:162
}
for _, v := range f {
fileTask := &nodetasks.File{
Path: "/usr/sbin/runc",
Contents: v,
Type: nodetasks.FileType_File,
Mode: new("0755"),
}
c.AddTask(fileTask)
}
// Add configuration file for easier use of crictl
b.addCrictlConfig(c)
var containerdVersion string
if b.NodeupConfig.ContainerdConfig != nil {
containerdVersion = fi.ValueOf(b.NodeupConfig.ContainerdConfig.Version)
} else {
return fmt.Errorf("error finding contained version")
}
sv, err := semver.ParseTolerant(containerdVersion)
if err != nil {
return fmt.Errorf("error parsing container runtime version %q: %w", containerdVersion, err)
}
c.AddTask(b.buildSystemdService(sv))
if err := b.buildSysconfigFile(c); err != nil {
return err
}
return nil
}
func (b *ContainerdBuilder) buildSystemdService(containerdVersion semver.Version) *nodetasks.Service {
// Based on https://github.com/containerd/containerd/blob/master/containerd.service
manifest := &systemd.Manifest{}View on GitHub (pinned to 4c8573c808)
Solutions
- Regenerate the cluster config with `kops update cluster` so nodes receive a nodeup config containing spec.containerd (ContainerdConfig)
- Verify spec.containerd.version is set in the cluster manifest and re-run the rolling update
- Re-fetch the latest nodeup config for the instance (kops get cluster --full / restart the kOps-generated cloud-init so nodeup pulls the current config)
- If running nodeup by hand, pass the current nodeup config produced by the same kOps version
Example fix
# before (cluster.yaml, no containerd block)
spec: {}
# after
spec:
containerd:
version: 1.7.18 Defensive patterns
Strategy: try-catch
Try / catch
if err := b.installContainerd(c); err != nil {
if strings.Contains(err.Error(), "error finding contained version") {
return fmt.Errorf("nodeup config missing ContainerdConfig; regenerate with 'kops update cluster': %w", err)
}
return err
} Prevention
- Keep cluster spec and nodeup config generated by the same kOps version
When it happens
Trigger: The nodeup bootstrap configuration for the node contains no ContainerdConfig stanza even though nodeup decided to install containerd — e.g. cluster spec updated by a different kOps version, or a hand-edited/stale nodeup config where the containerd block was dropped.
Common situations: Stale nodeup config on an existing instance after a kOps upgrade changed the config schema, running nodeup manually with an old --config file, or custom builder paths where containerd installation is forced without its config block.
Related errors
- building nodeConfig for instanceGroup: %w
- unable to find any containerd binaries in assets
- error parsing container runtime version %q: %w
- error building containerd flags: %v
- building json: %w
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/282288b8309bc60b.
Report an issue: GitHub.