derailed/k9s · warning
you must provide a selection
Error message
you must provide a selection
What it means
Returned by `DaemonSet.logOptions` (internal/view/ds.go:~55) when the daemonset table has no selected item. Log retrieval needs a daemonset name to derive pod-template log options; with GetSelectedItem()=="" it fails immediately.
Source
Thrown at internal/view/ds.go:55
}
func (d *DaemonSet) showPods(app *App, _ ui.Tabular, _ *client.GVR, path string) {
var res dao.DaemonSet
res.Init(app.factory, d.GVR())
ds, err := res.GetInstance(path)
if err != nil {
d.App().Flash().Err(err)
return
}
showPodsFromSelector(app, path, ds.Spec.Selector)
}
func (d *DaemonSet) logOptions(prev bool) (*dao.LogOptions, error) {
path := d.GetTable().GetSelectedItem()
if path == "" {
return nil, errors.New("you must provide a selection")
}
ds, err := d.getInstance(path)
if err != nil {
return nil, err
}
return podLogOptions(d.App(), path, prev, &ds.ObjectMeta, &ds.Spec.Template.Spec), nil
}
func (d *DaemonSet) getInstance(fqn string) (*appsv1.DaemonSet, error) {
var ds dao.DaemonSet
ds.Init(d.App().factory, client.DsGVR)
return ds.GetInstance(fqn)
}
View on GitHub (pinned to 2d3ccc6ba2)
Solutions
- Highlight a daemonset row first, then press the logs key
- Remove active filters that exclude all rows
- Verify daemonsets exist: `kubectl get ds -n <ns>`
- Fall back to pods view logs if you need logs from one node's pod
Defensive patterns
Strategy: validation
Validate before calling
if d.GetTable().GetSelectedItem() == "" {
d.App().Flash().Warnf("You must select a daemonset")
return nil
} Prevention
- Select a row before pressing log keys
- Check `kubectl get ds` for the namespace
- Clear filters hiding rows
When it happens
Trigger: Pressing the logs key on the daemonsets view while no row is selected (empty list, filter hiding all rows, or no highlight).
Common situations: Namespace without daemonsets; heavy filters; pressing `l` immediately after entering the view.
Related errors
- nothing selected
- you must provide a selection
- you must provide a selection
- you must provide a selection
- you must provide a selection
AI-assisted analysis of derailed/k9s@2d3ccc6ba2 (2026-08-15).
Data as JSON: /api/errors/3177dc85c4303df8.
Report an issue: GitHub.