kubernetes/kops · error
failed to add cilium addon: %w
Error message
failed to add cilium addon: %w
What it means
buildAddons installs the Cilium networking addon via addCiliumAddon(b, addons). Any failure from that helper (invalid Cilium config in cluster.spec, missing embedded manifest, template data error) is wrapped here and aborts addon building.
Source
Thrown at upup/pkg/fi/cloudup/bootstrapchannelbuilder/bootstrapchannelbuilder.go:1042
key := "networking.kindnet"
{
id := "k8s-1.32"
location := key + "/" + id + ".yaml"
addons.Add(&channelsapi.AddonSpec{
Name: new(key),
Selector: networkingSelector(),
Manifest: new(location),
Id: id,
NeedsRollingUpdate: channelsapi.NeedsRollingUpdateAll,
})
}
}
err := addCiliumAddon(b, addons)
if err != nil {
return nil, nil, fmt.Errorf("failed to add cilium addon: %w", err)
}
authenticationSelector := map[string]string{"role.kubernetes.io/authentication": "1"}
if b.Cluster.Spec.Authentication != nil {
if b.Cluster.Spec.Authentication.Kopeio != nil {
key := "authentication.kope.io"
{
location := key + "/k8s-1.12.yaml"
id := "k8s-1.12"
addons.Add(&channelsapi.AddonSpec{
Name: new(key),
Selector: authenticationSelector,
Manifest: new(location),
Id: id,
})View on GitHub (pinned to 4c8573c808)
Solutions
- Read the wrapped error for the cilium-specific cause
- Fix spec.networking.cilium fields (version, enablePolicy, etc.) with kops edit cluster / kops set
- Ensure the cilium addon manifest exists for your kops version (see addons/ templates)
- Upgrade kops to a release supporting your cilium configuration
- Temporarily switch networking plugin to isolate the cilium config issue
Example fix
// before
networking:
cilium:
version: 9.9.9
// after: use a version supported by kops
networking:
cilium:
version: v1.14.5 Defensive patterns
Strategy: validation
Validate before calling
// Validate cilium networking config before building addons
c := b.Cluster.Spec.Networking.Cilium
if c != nil && !supportedCiliumVersions.Has(c.Version) {
return fmt.Errorf("cilium version %q not supported by this kops", c.Version)
} Try / catch
if err := addCiliumAddon(b, addons); err != nil {
return fmt.Errorf("check spec.networking.cilium fields and kops version: %w", err)
} Prevention
- Only use cilium versions listed in kops docs/defaults
- Run `kops update cluster --dry-run` after networking changes
- Keep networking config changes isolated so failures are easy to bisect
When it happens
Trigger: Building/updating a cluster with spec.networking.cilium set, where addCiliumAddon fails due to invalid cilium configuration fields or an error rendering/locating the embedded cilium manifest.
Common situations: Incompatible cilium spec fields for the kops version (e.g. unsupported version or enablePolicy values); networking config typos; kops binary missing the cilium channel manifest.
Related errors
- cannot specify additional objects when multiple clusters are
- must specify a cluster when creating additional objects
- parsing kops version %q: %w
- found no packages in channel for name=%q
- found multiple packages in channel for name=%q
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/67379f2fa20e5f20.
Report an issue: GitHub.