{"record":{"id":"8a51ab55507b6342","repo":"kubernetes/kops","slug":"error-fetching-addons-v","errorCode":null,"errorMessage":"error fetching addons: %v","messagePattern":"error fetching addons: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/apply_cluster.go","lineNumber":336,"sourceCode":"\tkeyStore, err := c.Clientset.KeyStore(cluster)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tsshCredentialStore, err := c.Clientset.SSHCredentialStore(cluster)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tsecretStore, err := c.Clientset.SecretStore(cluster)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\taddonsClient := c.Clientset.AddonsFor(cluster)\n\taddons, err := addonsClient.List(ctx)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error fetching addons: %v\", err)\n\t}\n\n\t// Normalize k8s version\n\tversionWithoutV := strings.TrimSpace(cluster.Spec.KubernetesVersion)\n\tversionWithoutV = strings.TrimPrefix(versionWithoutV, \"v\")\n\tif cluster.Spec.KubernetesVersion != versionWithoutV {\n\t\tklog.Warningf(\"Normalizing kubernetes version: %q -> %q\", cluster.Spec.KubernetesVersion, versionWithoutV)\n\t\tcluster.Spec.KubernetesVersion = versionWithoutV\n\t}\n\n\t// check if we should recommend turning off anonymousAuth\n\t{\n\t\t// we do a check here because setting modifying the kubelet object messes with the output\n\t\twarn := false\n\t\tif cluster.Spec.Kubelet == nil {\n\t\t\twarn = true\n\t\t} else if cluster.Spec.Kubelet.AnonymousAuth == nil {\n\t\t\twarn = true","sourceCodeStart":318,"sourceCodeEnd":354,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/apply_cluster.go#L318-L354","documentation":"Run() lists the cluster's addons through the addons client (addonsClient.List). Any error from the backing addons channel/store — unreadable addons manifest, network failure fetching the addons channel, bad state-store permissions — is wrapped as this error. Addons are mandatory inputs to the loader, so Run aborts.","triggerScenarios":"addonsClient.List(ctx) returns an error: the addons object at the addons location cannot be read (missing addons channel, inaccessible state store, invalid addons manifest YAML, network/permission failure).","commonSituations":"State store bucket permissions changed; custom addons channel URL unreachable; corrupted or truncated addons object after an interrupted sync; offline CI runner without network access to the addons channel.","solutions":["Retry after checking network access and cloud credentials for the state store / addons channel location.","Restore or fix the addons object in the state store (re-upload kops addons from a matching kops release if it was corrupted).","If a custom addons location is set in the cluster spec, verify the URL/path is correct and reachable."],"exampleFix":"// before (unreachable custom channel)\naws s3 cp addons.yaml s3://state-bucket/...  # failed mid-sync\n// after\naws s3 cp addons.yaml s3://state-bucket/<prefix>/addons/addons.yaml && kops update cluster ... --yes","handlingStrategy":"retry","validationCode":"addonsClient := clientset.AddonsFor(cluster)\nif _, err := addonsClient.List(ctx); err != nil {\n    return fmt.Errorf(\"preflight: addons unreachable: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"addons, err := addonsClient.List(ctx)\nif err != nil {\n    if retriable(err) && attempt < maxAttempts {\n        time.Sleep(backoff); continue\n    }\n    return fmt.Errorf(\"error fetching addons: %w\", err)\n}","preventionTips":["Smoke-test state store reachability (list bucket) before running updates.","Avoid partial manual syncs of the addons objects; use kops-managed content.","Verify custom addons channel URLs are versioned and immutable."],"tags":["addons","state-store","network"],"backgroundTag":"addons-list-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"}