kubernetes/kops · error
KubernetesPath::ReadTree not supported
Error message
KubernetesPath::ReadTree not supported
What it means
Hard guard: recursive tree walking is not implemented for k8s:// paths, so KubernetesPath.ReadTree always returns this error. There is no hierarchical namespace to walk on the API server, so any generic code that tries to enumerate a subtree under a KubernetesPath fails here deterministically.
Source
Thrown at util/pkg/vfs/k8sfs.go:121
var b bytes.Buffer
_, err := p.WriteTo(&b)
if err != nil {
return nil, err
}
return b.Bytes(), nil
}
// WriteTo implements io.WriterTo
func (p *KubernetesPath) WriteTo(out io.Writer) (int64, error) {
return 0, fmt.Errorf("KubernetesPath::WriteTo not supported")
}
func (p *KubernetesPath) ReadDir() ([]Path, error) {
return nil, fmt.Errorf("KubernetesPath::ReadDir not supported")
}
func (p *KubernetesPath) ReadTree(ctx context.Context) ([]Path, error) {
return nil, fmt.Errorf("KubernetesPath::ReadTree not supported")
}
func (p *KubernetesPath) Base() string {
return path.Base(p.key)
}
func (p *KubernetesPath) PreferredHash() (*hashing.Hash, error) {
return p.Hash(hashing.HashAlgorithmMD5)
}
func (p *KubernetesPath) Hash(a hashing.HashAlgorithm) (*hashing.Hash, error) {
return nil, fmt.Errorf("KubernetesPath::Hash not supported")
}
View on GitHub (pinned to 4c8573c808)
Solutions
- Query the Kubernetes API directly for the objects you need
- Branch on the path scheme before calling ReadTree so k8s:// paths take an API-based code path
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at util/pkg/vfs/k8sfs.go:121 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/52fbdd2623adbe7e.
Report an issue: GitHub.