kubernetes/kops · error

error building well-known operators: %v

Error message

error building well-known operators: %v

What it means

When the UseAddonOperators feature flag is enabled, Build constructs an operator builder (ob) and calls ob.Build(b.ClusterAddons) to compute well-known operator addon packages. This error wraps any failure from that build, e.g. invalid addon specs or failed manifest generation.

Source

Thrown at upup/pkg/fi/cloudup/bootstrapchannelbuilder/bootstrapchannelbuilder.go:140

		}
		manifestPath := "addons/" + *addon.Spec.Manifest
		manifestResource := b.templates.Find(manifestPath)
		if manifestResource == nil {
			return fmt.Errorf("unable to find manifest %s", manifestPath)
		}
		addon.Source = manifestResource
		addon.SkipRender = !b.templates.IsTemplate(manifestPath)
	}

	if featureflag.UseAddonOperators.Enabled() {
		ob := &wellknownoperators.Builder{
			VFSContext: vfs.Context,
			Cluster:    b.Cluster,
		}

		addonPackages, clusterAddons, err := ob.Build(b.ClusterAddons)
		if err != nil {
			return fmt.Errorf("error building well-known operators: %v", err)
		}
		b.ClusterAddons = clusterAddons

		for _, pkg := range addonPackages {
			addons.AddWithSource(&pkg.Spec, fi.NewBytesResource(pkg.Manifest))
		}
	}

	// Not all objects in ClusterAddons should be applied to the cluster - although most should.
	// However, there are a handful of well-known exceptions:
	// e.g. configuration objects which are instead configured via files on the nodes.
	var applyAdditionalObjectsToCluster kubemanifest.ObjectList
	if b.ClusterAddons != nil {
		for _, addon := range b.ClusterAddons {
			applyToCluster := true

			if addon.GroupVersionKind().GroupKind() == (schema.GroupKind{Group: "kubescheduler.config.k8s.io", Kind: "KubeSchedulerConfiguration"}) {
				applyToCluster = false

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Read the wrapped %v error for the underlying cause
  2. Disable the feature flag: kops set cluster / KOPS_FEATURE_FLAGS without UseAddonOperators
  3. Fix the offending addon spec reported by the wrapped error
  4. Upgrade kops to a release with stabilized addon-operator support
  5. Re-download/rebuild channel addons from a clean state store

Example fix

// before
export KOPS_FEATURE_FLAGS=UseAddonOperators
// after (disable experimental operator builder)
unset KOPS_FEATURE_FLAGS
Defensive patterns

Strategy: try-catch

Validate before calling

// Only enable the flag on supported kops versions
if featureflag.UseAddonOperators.Enabled() && !kopsVersionSupportsAddonOperators {
    return errors.New("UseAddonOperators unsupported; unset flag")
}

Try / catch

if err := ob.Build(clusterAddons); err != nil {
    klog.Warningf("addon-operator build failed, falling back: %v", err)
    return fallbackToStandardAddons()
}

Prevention

When it happens

Trigger: Running cluster build/normalize with the UseAddonOperators feature flag enabled and ob.Build failing on an addon in the cluster's addon list (invalid spec, missing operator manifest, bad addon data).

Common situations: Experimental use of KOPS_FEATURE_FLAGS=UseAddonOperators; custom addons incompatible with the operator pipeline; corrupted channel addons cached in state store.

Related errors


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