kubernetes/kops · error
cluster Delete not implemented for vfs store
Error message
cluster Delete not implemented for vfs store
What it means
The VFS-backed cluster store never implemented Delete; calling ClusterVFS.Delete always returns this error. Deleting cluster state must go through the kops CLI tooling (kops delete cluster), which removes the state-store tree explicitly rather than via this API.
Source
Thrown at pkg/client/simple/vfsclientset/cluster.go:219
}
if c.ObjectMeta.Name != clusterName {
klog.Warningf("Name of cluster does not match: actual name was %q, but cluster name was %q (using registry path %v).", c.ObjectMeta.Name, clusterName, registry.PathCluster)
}
// TODO: Split this out into real version updates / schema changes
if c.Spec.ConfigStore.Base == "" {
configBase, err := r.configBase(clusterName)
if err != nil {
return nil, fmt.Errorf("error building ConfigStore.Base for cluster: %v", err)
}
c.Spec.ConfigStore.Base = configBase.Path()
}
return c, nil
}
func (r *ClusterVFS) Delete(name string, options *metav1.DeleteOptions) error {
return fmt.Errorf("cluster Delete not implemented for vfs store")
}
func (r *ClusterVFS) DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error {
return fmt.Errorf("cluster DeleteCollection not implemented for vfs store")
}
func (r *ClusterVFS) Watch(opts metav1.ListOptions) (watch.Interface, error) {
return nil, fmt.Errorf("cluster Watch not implemented for vfs store")
}
func (r *ClusterVFS) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *api.Cluster, err error) {
return nil, fmt.Errorf("cluster Patch not implemented for vfs store")
}
View on GitHub (pinned to 4c8573c808)
Solutions
- Use `kops delete cluster --name <name> --yes` (or the equivalent internal tooling) instead of the store API
- Implement the deletion manually against the VFS path (basePath/<name>) if embedding the library
- Restructure code so it does not call Delete on the vfs clientset
Example fix
// before
err := clusterVFS.Delete("prod.example.com", &metav1.DeleteOptions{})
// after
// delete via CLI / vfs directly:
err := vfs.Context.Rename(clusterPath, clusterPath.Join("deleted")) // or use kops delete cluster Defensive patterns
Strategy: validation
Validate before calling
var errDeleteNotSupported = fmt.Errorf("cluster Delete not implemented for vfs store")
if errors.Is(err, errDeleteNotSupported) || strings.Contains(err.Error(), "not implemented for vfs store") {
// route to CLI-based deletion instead
} Try / catch
err := clusterVFS.Delete(name, &metav1.DeleteOptions{})
if err != nil && strings.Contains(err.Error(), "not implemented for vfs store") {
return fmt.Errorf("use 'kops delete cluster --name %s --yes' to delete", name)
} Prevention
- Assume the vfs clientset supports only read/create/update, not delete
- Use kops CLI (delete cluster) for destructive state-store operations
- Check capability before exposing store APIs to automation
- Feature-gate delete paths behind real clientset usage
When it happens
Trigger: Any call to ClusterVFS.Delete(name, options) — there is no successful path; likewise DeleteCollection returns its own not-implemented error.
Common situations: Code written against the clientset interface assuming full CRUD parity; automation scripts using the simple clientset to remove clusters.
Related errors
- ReadOnlyError
- unexpected kind for cluster, got %T, want kops.Cluster
- method ConfigBaseFor not supported in server-side client
- ResourceVersion not supported in InstanceGroupVFS::Get
- error loading secret %q: %w
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/707274441e7ca0ea.
Report an issue: GitHub.