{"record":{"id":"325b92f19ffaa178","repo":"derailed/k9s","slug":"no-data-found-for-resource-s","errorCode":null,"errorMessage":"no data found for resource %s","messagePattern":"no data found for resource (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"internal/model1/table_data.go","lineNumber":275,"sourceCode":"\t\t\tif !ok {\n\t\t\t\treturn fmt.Errorf(\"expecting a meta table but got %T\", oo[0])\n\t\t\t}\n\t\t\trows = make(Rows, len(table.Rows))\n\t\t\tif err := GenericHydrate(t.namespace, table, rows, r); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t} else {\n\t\t\trows = make(Rows, len(oo))\n\t\t\tif err := Hydrate(t.namespace, oo, rows, r); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\n\tt.Update(rows)\n\tt.SetHeader(t.namespace, r.Header(t.namespace))\n\tif t.HeaderCount() == 0 {\n\t\treturn fmt.Errorf(\"no data found for resource %s\", t.gvr)\n\t}\n\n\treturn nil\n}\n\n// Empty checks if there are no entries.\nfunc (t *TableData) Empty() bool {\n\tt.mx.RLock()\n\tdefer t.mx.RUnlock()\n\n\treturn t.rowEvents.Empty()\n}\n\nfunc (t *TableData) SetRowEvents(re *RowEvents) {\n\tt.rowEvents = re\n}\n\nfunc (t *TableData) GetRowEvents() *RowEvents {","sourceCodeStart":257,"sourceCodeEnd":293,"githubUrl":"https://github.com/derailed/k9s/blob/2d3ccc6ba2ce98c3781bfc441bb3e884f072774f/internal/model1/table_data.go#L257-L293","documentation":"After hydrating rows and calling SetHeader, TableData checks HeaderCount(); zero header columns means the table has no column definitions to render, so the view cannot be displayed and the GVR is reported. The data fetch itself succeeded — only the header is missing.","triggerScenarios":"Loading a resource view where the renderer produces no columns: custom view/skin configs whose columns don't match the resource's fields, CRDs without additionalPrinterColumns on a server that returns a bare table, or a namespace where the table came back with only hidden/namespaced-augmented columns.","commonSituations":"Custom k9s views.yaml or skin column overrides with wrong JSONPath/field names (typo'd field silently drops the column); freshly installed operators whose CRD lacks printer columns; AGgregated APIs returning tables without column definitions.","solutions":["Check for custom view/skin overrides on that resource and remove/fix the columns block (verify field names with kubectl get <crd> -o yaml)","For CRDs, define additionalPrinterColumns in the CRD spec so the server emits columns","Confirm kubectl get <resource> shows headers in a terminal (server-side table works)","Restart/reload k9s config after fixing: the views/skin are read at launch"],"exampleFix":"# before: views.yaml with wrong field name\nviews:\n  v1/pods:\n    columns:\n      - NAME: AGE\n        width: 10\n# after: correct field\nviews:\n  v1/pods:\n    columns:\n      - AGE: AGE\n        width: 10","handlingStrategy":"validation","validationCode":"// Before mounting the view, confirm the server exposes columns.\ncols := resourceColumnNames(gvr) // via discovery/CRD additionalPrinterColumns\nif len(cols) == 0 && !hasCustomView(gvr) {\n    return fmt.Errorf(\"resource %s has no printer columns; define a custom view or CRD additionalPrinterColumns\", gvr)\n}","typeGuard":null,"tryCatchPattern":"if err := td.reconcile(ctx, ns); err != nil && strings.Contains(err.Error(), \"no data found for resource\") {\n    // empty-but-valid view beats a hard error; surface a soft 'no columns configured' notice\n    return showNoColumnsNotice(td.gvr)\n}","preventionTips":["Validate custom views.yaml column names against kubectl get output before shipping","Define additionalPrinterColumns when authoring CRDs","Reload k9s after editing views/skin files — stale configs reproduce the error"],"tags":["kubernetes","table","header","configuration","k9s"],"backgroundTag":null,"analyzedSha":"2d3ccc6ba2ce98c3781bfc441bb3e884f072774f","analyzedAt":"2026-08-15T16:09:14.432Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}