kubernetes/kops · error

building kops-channels pod: %w

Error message

building kops-channels pod: %w

What it means

The kops-channels addon builder constructs a static pod for the channels controller via b.buildPod(channels). Any failure inside buildPod (typically image resolution via the asset builder, or invalid channel task fields) is wrapped with this message so callers know which manifest failed.

Source

Thrown at pkg/model/components/channels/model.go:70

// the state store. Nodeup copies the manifest onto each control-plane node, mirroring how
// etcd-manager manifests are delivered.
type ChannelsBuilder struct {
	*model.KopsModelContext
	Lifecycle    fi.Lifecycle
	AssetBuilder *assets.AssetBuilder
}

var _ fi.CloudupModelBuilder = &ChannelsBuilder{}

func (b *ChannelsBuilder) Build(c *fi.CloudupModelBuilderContext) error {
	channels, err := b.channelList()
	if err != nil {
		return err
	}

	pod, err := b.buildPod(channels)
	if err != nil {
		return fmt.Errorf("building kops-channels pod: %w", err)
	}
	manifest, err := k8scodecs.ToVersionedYaml(pod)
	if err != nil {
		return fmt.Errorf("marshaling kops-channels pod: %w", err)
	}

	c.AddTask(&fitasks.ManagedFile{
		Contents:  fi.NewBytesResource(manifest),
		Lifecycle: b.Lifecycle,
		Location:  new(channelsManifestPath),
		Name:      new("manifests-channels-kops-channels"),
	})
	return nil
}

// channelList returns the bootstrap channel plus cluster.Spec.Addons. The bootstrap URL is
// built via vfs path joining so toolbox_enroll's identity comparison stays byte-identical.
func (b *ChannelsBuilder) channelList() ([]string, error) {

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Inspect the wrapped inner error (%w) to find the actual buildPod failure
  2. Verify image assets resolve: check the channel image string and your asset/registry mirror configuration
  3. Re-run with --v=2 or higher logging to see which asset failed to build
  4. If the state store addons are corrupt, re-sync the bootstrap-channel.yaml addon file

Example fix

# before: unreachable image mirror
ekops update cluster --name cluster --target terraform
# error: building kops-channels pod: ...
# after: point assets at a reachable mirror
export KOPS_ASSET_URL=https://internal-mirror.example.com
kops toolbox bundle-file --assets-output assets
kops update cluster --name cluster --target terraform
Defensive patterns

Strategy: try-catch

Validate before calling

img, err := assetBuilder.RemapImage(channelPodImage)
if err != nil { return fmt.Errorf("channels image %q cannot be resolved: %w", channelPodImage, err) }

Try / catch

if err := b.Build(ctx, obj); err != nil {
	var inner error
	if errors.Unwrap(err) != nil { inner = errors.Unwrap(err) }
	log.Errorf("channels pod build failed: %v (cause: %v)", err, inner)
	return err
}

Prevention

When it happens

Trigger: Rendering the channels addon during model build when buildPod fails — e.g. the kops-channels image cannot be resolved/remeapped by the AssetBuilder (bad registry, unreachable mirror, malformed image string).

Common situations: Air-gapped/ corporately mirrored registries where the asset builder rewrites registry.k8s.io images and fails; corrupted KOPS_STATE_STORE addons; custom image placeholders unresolved.

Related errors


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/85bf4780157ca1b4. Report an issue: GitHub.