{"record":{"id":"c177f4992721e386","repo":"kubernetes/kops","slug":"error-listing-namespaces-v-c177f4","errorCode":null,"errorMessage":"error listing namespaces: %v","messagePattern":"error listing namespaces: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"channels/pkg/cmd/get_addons.go","lineNumber":91,"sourceCode":"\nfunc RunGetAddons(ctx context.Context, f *ChannelsFactory, out io.Writer, options *GetAddonsOptions) error {\n\trestConfig, err := f.RESTConfig()\n\tif err != nil {\n\t\treturn err\n\t}\n\thttpClient, err := f.HTTPClient()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tk8sClient, err := kubernetes.NewForConfigAndClient(restConfig, httpClient)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"building kube client: %w\", err)\n\t}\n\n\tnamespaces, err := k8sClient.CoreV1().Namespaces().List(ctx, metav1.ListOptions{})\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error listing namespaces: %v\", err)\n\t}\n\n\tvar info []*addonInfo\n\n\tfor i := range namespaces.Items {\n\t\tns := &namespaces.Items[i]\n\t\taddons := channels.FindChannelVersions(ns)\n\t\tfor name, version := range addons {\n\t\t\ti := &addonInfo{\n\t\t\t\tName:      name,\n\t\t\t\tVersion:   version,\n\t\t\t\tNamespace: ns,\n\t\t\t}\n\t\t\tinfo = append(info, i)\n\t\t}\n\t}\n\n\tif len(info) == 0 {","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/channels/pkg/cmd/get_addons.go#L73-L109","documentation":"RunGetAddons lists all namespaces via the Kubernetes API to map addons to namespaces; this wraps that LIST call failing. The client was built successfully, so this is an API-level failure: server unreachable, RBAC denial, or a transient error.","triggerScenarios":"Thrown at channels/pkg/cmd/get_addons.go:91 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check API server reachability and cluster health","Verify the user/service account has permission to list namespaces","Retry; transient API errors are common during control-plane churn"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}