{"record":{"id":"fd0ed10bf0150005","repo":"kubernetes/kops","slug":"building-kube-client-w-fd0ed1","errorCode":null,"errorMessage":"building kube client: %w","messagePattern":"building kube client: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"channels/pkg/cmd/get_addons.go","lineNumber":86,"sourceCode":"type addonInfo struct {\n\tName      string\n\tVersion   *channels.ChannelVersion\n\tNamespace *v1.Namespace\n}\n\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}","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/channels/pkg/cmd/get_addons.go#L68-L104","documentation":"In RunGetAddons, constructing the typed kubernetes clientset from the REST config and HTTP client failed. Both inputs were already validated; this wraps a client-go construction error, most commonly an unsupported authentication configuration.","triggerScenarios":"Thrown at channels/pkg/cmd/get_addons.go:86 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped client-go error for the unsupported config field","Fix the kubeconfig auth setup (e.g. valid exec credential plugin or token)","Confirm the API server URL in the kubeconfig is correct"],"exampleFix":null,"handlingStrategy":"try-catch","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"}