{"record":{"id":"67379f2fa20e5f20","repo":"kubernetes/kops","slug":"failed-to-add-cilium-addon-w","errorCode":null,"errorMessage":"failed to add cilium addon: %w","messagePattern":"failed to add cilium addon: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/bootstrapchannelbuilder/bootstrapchannelbuilder.go","lineNumber":1042,"sourceCode":"\t\tkey := \"networking.kindnet\"\n\n\t\t{\n\t\t\tid := \"k8s-1.32\"\n\t\t\tlocation := key + \"/\" + id + \".yaml\"\n\n\t\t\taddons.Add(&channelsapi.AddonSpec{\n\t\t\t\tName:               new(key),\n\t\t\t\tSelector:           networkingSelector(),\n\t\t\t\tManifest:           new(location),\n\t\t\t\tId:                 id,\n\t\t\t\tNeedsRollingUpdate: channelsapi.NeedsRollingUpdateAll,\n\t\t\t})\n\t\t}\n\t}\n\n\terr := addCiliumAddon(b, addons)\n\tif err != nil {\n\t\treturn nil, nil, fmt.Errorf(\"failed to add cilium addon: %w\", err)\n\t}\n\n\tauthenticationSelector := map[string]string{\"role.kubernetes.io/authentication\": \"1\"}\n\n\tif b.Cluster.Spec.Authentication != nil {\n\t\tif b.Cluster.Spec.Authentication.Kopeio != nil {\n\t\t\tkey := \"authentication.kope.io\"\n\n\t\t\t{\n\t\t\t\tlocation := key + \"/k8s-1.12.yaml\"\n\t\t\t\tid := \"k8s-1.12\"\n\n\t\t\t\taddons.Add(&channelsapi.AddonSpec{\n\t\t\t\t\tName:     new(key),\n\t\t\t\t\tSelector: authenticationSelector,\n\t\t\t\t\tManifest: new(location),\n\t\t\t\t\tId:       id,\n\t\t\t\t})","sourceCodeStart":1024,"sourceCodeEnd":1060,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/bootstrapchannelbuilder/bootstrapchannelbuilder.go#L1024-L1060","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\nnetworking:\n  cilium:\n    version: 9.9.9\n// after: use a version supported by kops\nnetworking:\n  cilium:\n    version: v1.14.5","handlingStrategy":"validation","validationCode":"// Validate cilium networking config before building addons\nc := b.Cluster.Spec.Networking.Cilium\nif c != nil && !supportedCiliumVersions.Has(c.Version) {\n    return fmt.Errorf(\"cilium version %q not supported by this kops\", c.Version)\n}","typeGuard":null,"tryCatchPattern":"if err := addCiliumAddon(b, addons); err != nil {\n    return fmt.Errorf(\"check spec.networking.cilium fields and kops version: %w\", err)\n}","preventionTips":["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"],"tags":["cilium","networking","addons","kops"],"backgroundTag":"addon-install-failed","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}