{"record":{"id":"a2c6fb8afd748a71","repo":"kubernetes/kops","slug":"error-building-corev1-client-v-a2c6fb","errorCode":null,"errorMessage":"error building corev1 client: %v","messagePattern":"error building corev1 client: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/kops-controller/controllers/node_controller.go","lineNumber":48,"sourceCode":"\t\"k8s.io/klog/v2\"\n\t\"k8s.io/kops/pkg/nodeidentity\"\n\t\"k8s.io/kops/pkg/nodelabels\"\n\tctrl \"sigs.k8s.io/controller-runtime\"\n\t\"sigs.k8s.io/controller-runtime/pkg/client\"\n\t\"sigs.k8s.io/controller-runtime/pkg/manager\"\n)\n\n// NewNodeReconciler is the constructor for a NodeReconciler\nfunc NewNodeReconciler(mgr manager.Manager, identifier nodeidentity.Identifier) (*NodeReconciler, error) {\n\tr := &NodeReconciler{\n\t\tclient:     mgr.GetClient(),\n\t\tlog:        ctrl.Log.WithName(\"controllers\").WithName(\"Node\"),\n\t\tidentifier: identifier,\n\t}\n\n\tcoreClient, err := corev1client.NewForConfig(mgr.GetConfig())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error building corev1 client: %v\", err)\n\t}\n\tr.coreV1Client = coreClient\n\n\treturn r, nil\n}\n\n// NodeReconciler observes Node objects, and labels them with the correct labels for the instancegroup\n// This used to be done by the kubelet, but is moving to a central controller for greater security in 1.16\ntype NodeReconciler struct {\n\t// client is the controller-runtime client\n\tclient client.Client\n\n\t// log is a logr\n\tlog logr.Logger\n\n\t// coreV1Client is a client-go client for patching nodes\n\tcoreV1Client *corev1client.CoreV1Client\n","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/cmd/kops-controller/controllers/node_controller.go#L30-L66","documentation":"NewNodeReconciler builds a typed corev1 client from the controller-runtime manager's REST config; this wraps that construction failing. The manager is already running, so this indicates an unsupported or malformed auth configuration in the REST config.","triggerScenarios":"Thrown at cmd/kops-controller/controllers/node_controller.go:48 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped error for the client-go construction reason","Verify the kubeconfig/credentials used by kops-controller","Fix the auth configuration and restart the controller"],"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"}