{"record":{"id":"1b5abfaba81c05cd","repo":"kubernetes/kops","slug":"unhandled-kind-q-in-s-1b5abf","errorCode":null,"errorMessage":"unhandled kind %q in %s","messagePattern":"unhandled kind %q in (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/kops/delete.go","lineNumber":145,"sourceCode":"\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\terr := RunDeleteInstanceGroup(ctx, factory, out, options)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\tcase *kopsapi.SSHCredential:\n\t\t\t\toptions := &DeleteSSHPublicKeyOptions{\n\t\t\t\t\tClusterName: v.ObjectMeta.Labels[kopsapi.LabelClusterName],\n\t\t\t\t}\n\n\t\t\t\terr = RunDeleteSSHPublicKey(ctx, factory, out, options)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\tdefault:\n\t\t\t\tklog.V(2).Infof(\"Type of object was %T\", v)\n\t\t\t\treturn fmt.Errorf(\"unhandled kind %q in %s\", gvk, f)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":127,"sourceCodeEnd":152,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/cmd/kops/delete.go#L127-L152","documentation":"RunDelete iterates over the resource kinds returned for the delete target and dispatches each to a kind-specific delete function (e.g. RunDeleteSSHPublicKey). When the group/version/kind of an object does not match any handled case, the default branch is hit and this error is returned, naming the unhandled GVK and the resource string. It means kOps does not know how to delete that object type via this command.","triggerScenarios":"Running `kops delete` with an object kind the switch statement does not cover, e.g. a newer/unknown resource kind in the state store or a typo'd kind argument such as `kops delete secret` vs supported kinds (cluster, instancegroup, sshpublickey).","commonSituations":"Users upgrading kOps with state store entries of kinds added after their CLI version; passing an invalid kind argument to `kops delete`; plugins or custom resources appearing in the registry.","solutions":["Check `kops delete --help` for the list of supported kinds and use the exact supported kind name.","Upgrade kops to a version that supports the resource kind you are deleting.","Inspect the type with `klog.V(2)` output (run with -v=2) to confirm what object was encountered and delete it by another means (e.g. directly from the state store)."],"exampleFix":"// before\nkops delete myresource --name cluster.example.com\n// after\nkops delete instancegroup mygroup --name cluster.example.com  # use a supported kind","handlingStrategy":"validation","validationCode":"supported := []string{\"cluster\", \"instancegroup\", \"secret\", \"sshpublickey\"}\nkind := strings.ToLower(strings.TrimSpace(target))\nif !slices.Contains(supported, kind) {\n    return fmt.Errorf(\"kind %q is not supported by kops delete; supported: %v\", kind, supported)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only pass kinds listed in `kops delete --help`.","Keep the kops CLI version aligned with the state store cluster version.","Run with -v=2 to see the %T debug output when debugging unknown kinds."],"tags":["cli","validation","unsupported-kind"],"backgroundTag":"unsupported-resource-kind","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"}