{"record":{"id":"034488935b746641","repo":"kubernetes/kops","slug":"error-parsing-object-in-manifest-v","errorCode":null,"errorMessage":"error parsing object in manifest: %v","messagePattern":"error parsing object in manifest: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/model/manifests.go","lineNumber":51,"sourceCode":"\tdecoder := yaml.NewYAMLOrJSONDecoder(bytes.NewReader(data), 4096)\n\tdeser := scheme.Codecs.UniversalDeserializer()\n\n\tvar objects []runtime.Object\n\n\tfor {\n\t\text := runtime.RawExtension{}\n\t\tif err := decoder.Decode(&ext); err != nil {\n\t\t\tif err == io.EOF {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tfmt.Fprintf(os.Stderr, \"%s\", string(data))\n\t\t\tklog.Infof(\"manifest: %s\", string(data))\n\t\t\treturn nil, fmt.Errorf(\"error parsing manifest: %v\", err)\n\t\t}\n\n\t\tobj, _, err := deser.Decode([]byte(ext.Raw), nil, nil)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error parsing object in manifest: %v\", err)\n\t\t}\n\n\t\tobjects = append(objects, obj)\n\t}\n\n\treturn objects, nil\n}\n","sourceCodeStart":33,"sourceCodeEnd":59,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/model/manifests.go#L33-L59","documentation":"A document in the manifest decoded as YAML but failed deserialization into a typed Kubernetes object: typically an unknown or misspelled apiVersion/kind, or fields that do not match the scheme's schema.","triggerScenarios":"Thrown at pkg/model/manifests.go:51 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify apiVersion and kind of the failing object against the Kubernetes API","Ensure the manifest matches the object versions supported by the kOps version in use","Simplify the object to minimal fields and re-add progressively to isolate the offending field"],"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-12T12:17:11.808Z"}