kubernetes/kops · error
KubernetesPath::Remove not supported
Error message
KubernetesPath::Remove not supported
What it means
Hard guard: KubernetesPath (k8s:// VFS paths backed by the API server) is read-mostly and does not implement deletion, so Remove always returns this error. RemoveAllVersions delegates to Remove, so versioned cleanup hits the same wall. Any code attempting to delete through a k8s:// path will always fail here.
Source
Thrown at util/pkg/vfs/k8sfs.go:71
func (p *KubernetesPath) Path() string {
return "k8s://" + p.host + "/" + p.key
}
func (p *KubernetesPath) Host() string {
return p.host
}
func (p *KubernetesPath) Key() string {
return p.key
}
func (p *KubernetesPath) String() string {
return p.Path()
}
func (p *KubernetesPath) Remove(ctx context.Context) error {
return fmt.Errorf("KubernetesPath::Remove not supported")
}
func (p *KubernetesPath) RemoveAll(ctx context.Context) error {
return fmt.Errorf("KubernetesPath::RemoveAll not supported")
}
func (p *KubernetesPath) RemoveAllVersions(ctx context.Context) error {
return p.Remove(ctx)
}
func (p *KubernetesPath) Join(relativePath ...string) Path {
args := []string{p.key}
args = append(args, relativePath...)
joined := path.Join(args...)
return &KubernetesPath{
k8sContext: p.k8sContext,
host: p.host,
key: joined,View on GitHub (pinned to 4c8573c808)
Solutions
- Use the Kubernetes API (client-go) to delete ConfigMaps/Secrets instead of the VFS layer
- Filter out k8s:// paths before calling Remove in generic VFS code
- Use an S3/GCS/mem path if write-then-delete semantics are required
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at util/pkg/vfs/k8sfs.go:71 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/ef27b8c4a73e55c1.
Report an issue: GitHub.