derailed/k9s · warning

resource %s is not Loggable

Error message

resource %s is not Loggable

What it means

Log.load fetches the DAO accessor for a GVR and type-asserts it to dao.Loggable (TailLogs). Resources whose DAO does not implement Loggable cannot stream logs, so the log model aborts before creating any watcher.

Source

Thrown at internal/model/log.go:225

}

func (l *Log) cancel() {
	l.mx.Lock()
	defer l.mx.Unlock()
	if l.cancelFn != nil {
		l.cancelFn()
		l.cancelFn = nil
	}
}

func (l *Log) load(ctx context.Context) error {
	accessor, err := dao.AccessorFor(l.factory, l.gvr)
	if err != nil {
		return err
	}
	loggable, ok := accessor.(dao.Loggable)
	if !ok {
		return fmt.Errorf("resource %s is not Loggable", l.gvr)
	}

	l.cancel()
	ctx = context.WithValue(ctx, internal.KeyFactory, l.factory)
	ctx, l.cancelFn = context.WithCancel(ctx)

	cc, err := loggable.TailLogs(ctx, l.logOptions)
	if err != nil {
		slog.Error("Tail logs failed", slogs.Error, err)
		l.cancel()
		l.fireLogError(err)
	}
	for _, c := range cc {
		go l.updateLogs(ctx, c)
	}

	return nil
}

View on GitHub (pinned to 2d3ccc6ba2)

Solutions

  1. Invoke logs on pod-capable resources: Pod, Deployment, StatefulSet, DaemonSet, Job, CronJob (and containers inside them)
  2. If a custom resource should support logs, implement dao.Loggable (TailLogs) on its accessor
  3. Check keyboard mappings / command alias so the log key is not bound for non-loggable views

Example fix

// before: log request on a ConfigMap accessor
loggable, ok := accessor.(dao.Loggable) // ok == false

// after: guard before streaming
if loggable, ok := accessor.(dao.Loggable); ok {
    cc, err := loggable.TailLogs(ctx, opts)
}
Defensive patterns

Strategy: type-guard

Type guard

func loggableFor(factory dao.Factory, gvr *client.GVR) (dao.Loggable, bool) {
    accessor, err := dao.AccessorFor(factory, gvr)
    if err != nil { return nil, false }
    l, ok := accessor.(dao.Loggable)
    return l, ok
}

Try / catch

err := l.load(ctx)
if err != nil && strings.Contains(err.Error(), "is not Loggable") {
    // disable the log view for this GVR rather than flashing an error
    return disableLogsFor(gvr)
}

Prevention

When it happens

Trigger: Opening a log view (pressing 'l') on a resource that has no log semantics: Namespace, ConfigMap, Service without pods, Node, RBAC objects, CRDs — anything whose accessor lacks a TailLogs method.

Common situations: Muscle-memory pressing the log shortcut while browsing non-workload resources; custom views binding the log command to unsupported GVRs.

Related errors


AI-assisted analysis of derailed/k9s@2d3ccc6ba2 (2026-08-15). Data as JSON: /api/errors/eb3e744be4f5c3cd. Report an issue: GitHub.