{"record":{"id":"ed64780f041ce814","repo":"kubesphere/kubesphere","slug":"cluster-connection-config-s-not-found","errorCode":null,"errorMessage":"cluster connection config %s not found","messagePattern":"cluster connection config (.+?) not found","errorType":"http","errorClass":null,"httpStatus":404,"severity":"error","filePath":"pkg/kapis/config/v1alpha2/handler.go","lineNumber":184,"sourceCode":"\t_ = resp.WriteEntity(lists)\n}\n\nfunc (h *handler) getClusterConnectionConfiguration(req *restful.Request, resp *restful.Response) {\n\tconfigName := req.PathParameter(\"config\")\n\tif len(validation.IsDNS1123Label(configName)) > 0 {\n\t\tapi.HandleNotFound(resp, req, fmt.Errorf(\"platform config %s not found\", configName))\n\t\treturn\n\t}\n\n\tsecret := &corev1.Secret{\n\t\tObjectMeta: metav1.ObjectMeta{\n\t\t\tNamespace: constants.KubeSphereNamespace,\n\t\t\tName:      configName,\n\t\t},\n\t}\n\tif err := h.client.Get(req.Request.Context(), client.ObjectKeyFromObject(secret), secret); err != nil {\n\t\tif apierrors.IsNotFound(err) {\n\t\t\tapi.HandleNotFound(resp, req, fmt.Errorf(\"cluster connection config %s not found\", configName))\n\t\t\treturn\n\t\t}\n\t\tapi.HandleError(resp, req, err)\n\t\treturn\n\t}\n\n\tconfig := ClusterConnectionConfiguration{\n\t\tTypeMeta: metav1.TypeMeta{\n\t\t\tKind:       ClusterConnectionConfigurationKind,\n\t\t\tAPIVersion: APIVersion,\n\t\t},\n\t\tObjectMeta: metav1.ObjectMeta{\n\t\t\tUID:               secret.UID,\n\t\t\tName:              secret.Name,\n\t\t\tResourceVersion:   secret.ResourceVersion,\n\t\t\tCreationTimestamp: secret.CreationTimestamp,\n\t\t},\n\t}","sourceCodeStart":166,"sourceCodeEnd":202,"githubUrl":"https://github.com/kubesphere/kubesphere/blob/04a29b5c601470fa6bc2f2e92358dcb802a0d414/pkg/kapis/config/v1alpha2/handler.go#L166-L202","documentation":"After passing name validation, the Secret named after the requested platform config (in the KubeSphere namespace, key ClusterConnectionConfigFileName) could not be fetched: the wrapped error is a Kubernetes API failure other than NotFound (which is handled separately), e.g. RBAC denial, timeout, or server error.","triggerScenarios":"Thrown at pkg/kapis/config/v1alpha2/handler.go:184 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped error for RBAC or connectivity problems against the platform cluster","Confirm the Secret <configName> exists in the KubeSphere namespace","Verify apiserver service account permissions for reading Secrets"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"04a29b5c601470fa6bc2f2e92358dcb802a0d414","analyzedAt":"2026-09-03T18:33:15.017Z","contentChangedAt":"2026-09-03T18:33:15.017Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}