derailed/k9s · error

no describer for %q

Error message

no describer for %q

What it means

YAML.ToYAML resolves the DAO accessor for a GVR and requires dao.Describer (for its ToYAML method, with optional Secret decode toggling). Accessors without the interface cannot render YAML, and the error names the GVR.

Source

Thrown at internal/model/yaml.go:207

			break
		}
	}

	if victim >= 0 {
		y.listeners = append(y.listeners[:victim], y.listeners[victim+1:]...)
	}
}

// ToYAML returns a resource yaml.
func (y *YAML) ToYAML(ctx context.Context, gvr *client.GVR, path string, showManaged bool) (string, error) {
	meta, err := getMeta(ctx, gvr)
	if err != nil {
		return "", err
	}

	desc, ok := meta.DAO.(dao.Describer)
	if !ok {
		return "", fmt.Errorf("no describer for %q", meta.DAO.GVR())
	}
	if desc, ok := meta.DAO.(*dao.Secret); ok {
		desc.SetDecodeData(y.decode)
	}

	return desc.ToYAML(path, showManaged)
}

// Toggle toggles the decode flag.
func (y *YAML) Toggle() {
	y.decode = !y.decode
}

View on GitHub (pinned to 2d3ccc6ba2)

Solutions

  1. Verify which accessor is registered for the GVR and make it implement dao.Describer (usually embed dao.Resource)
  2. Try the resource's flat list view, which typically uses the generic accessor with YAML support
  3. Fall back to kubectl get <gvr> <name> -o yaml
Defensive patterns

Strategy: type-guard

Type guard

func yamlRenderable(accessor dao.Accessor) (dao.Describer, bool) {
    d, ok := accessor.(dao.Describer)
    return d, ok
}

Try / catch

out, err := y.ToYAML(ctx, gvr, path, showManaged)
if err != nil && strings.Contains(err.Error(), "no describer for") {
    return "", fmt.Errorf("%w — use 'kubectl get %s %s -o yaml' instead", err, gvr, path)
}

Prevention

When it happens

Trigger: Opening the YAML view on a resource whose DAO accessor lacks ToYAML — bare/custom accessors, reference rows, or plugin DAO registrations missing the methods.

Common situations: Custom resources added with a hand-rolled DAO; tree/reference navigation to exotic resource types; version skew where an accessor refactor dropped the interface.

Related errors


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