{"record":{"id":"b5d6d81daa3d0edc","repo":"kubernetes/kops","slug":"error-creating-dynamic-client-w","errorCode":null,"errorMessage":"error creating dynamic client: %w","messagePattern":"error creating dynamic client: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/nodeup/nodetasks/discovery_service_register.go","lineNumber":132,"sourceCode":"\tclientCA, err := fi.ResourceAsBytes(e.ClientCA)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tclientCertBundle := []byte{}\n\tclientCertBundle = append(clientCertBundle, clientCert...)\n\tclientCertBundle = append(clientCertBundle, clientCA...)\n\n\tconfig := &rest.Config{\n\t\tHost: e.DiscoveryService,\n\t\tTLSClientConfig: rest.TLSClientConfig{\n\t\t\tCertData: clientCertBundle,\n\t\t\tKeyData:  clientKey,\n\t\t},\n\t}\n\tkubeClient, err := dynamic.NewForConfig(config)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error creating dynamic client: %w\", err)\n\t}\n\n\tspec := discoveryapi.DiscoveryEndpointSpec{}\n\n\tspec.OIDC = &discoveryapi.OIDCSpec{}\n\n\tfor _, jwk := range e.JWKS {\n\t\tspec.OIDC.Keys = append(spec.OIDC.Keys, jwk.JSONWebKey)\n\t}\n\n\tep := &discoveryapi.DiscoveryEndpoint{\n\t\tSpec: spec,\n\t}\n\n\tep.Kind = \"DiscoveryEndpoint\"\n\tep.APIVersion = \"discovery.kops.k8s.io/v1alpha1\"\n\n\tep.Name = e.RegisterName","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/nodeup/nodetasks/discovery_service_register.go#L114-L150","documentation":"Error \"error creating dynamic client: %w\" thrown in kubernetes/kops.","triggerScenarios":"Thrown at upup/pkg/fi/nodeup/nodetasks/discovery_service_register.go:132 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"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"}