kubernetes/kops · error

error deleting cluster files in %s: %w

Error message

error deleting cluster files in %s: %w

What it means

The recursive RemoveAll of the cluster's config base failed after the safety scan passed; the VFS layer could not delete one or more objects (permissions, concurrent modification, or network errors).

Source

Thrown at pkg/client/simple/vfsclientset/clientset.go:191

			continue
		}
		if strings.HasPrefix(relativePath, "igconfig/") {
			continue
		}
		if strings.HasPrefix(relativePath, "manifests/") {
			continue
		}
		// TODO: offer an option _not_ to delete backups?
		if strings.HasPrefix(relativePath, "backups/") {
			continue
		}

		return fmt.Errorf("refusing to delete: unknown file found: %s", path)
	}

	err = basePath.RemoveAll(ctx)
	if err != nil {
		return fmt.Errorf("error deleting cluster files in %s: %w", basePath, err)
	}

	return nil
}

func (c *VFSClientset) DeleteCluster(ctx context.Context, cluster *kops.Cluster) error {
	if cluster.Spec.ServiceAccountIssuerDiscovery != nil {
		discoveryStore := cluster.Spec.ServiceAccountIssuerDiscovery.DiscoveryStore
		if discoveryStore != "" {
			path, err := c.VFSContext().BuildVfsPath(discoveryStore)
			if err != nil {
				return err
			}

			err = path.Join("openid/v1/jwks").Remove(ctx)
			if err != nil {
				return err
			}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Check delete permissions on the state store bucket/prefix
  2. Retry kops delete cluster
  3. Manually empty the bucket prefix if objects are stuck
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at pkg/client/simple/vfsclientset/clientset.go:191 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/080eeaf2063e87b7. Report an issue: GitHub.