kubernetes/kops · error

error parsing ConfigStore.Base %q: %v

Error message

error parsing ConfigStore.Base %q: %v

What it means

The ConfigStore.Base is the VFS path where cluster configuration is stored (e.g. s3://bucket/prefix). run() calls VFSContext().BuildVfsPath to parse it, and wraps any parse failure in this error. The path scheme is either unsupported or malformed.

Source

Thrown at upup/pkg/fi/cloudup/populate_cluster_spec.go:166

					//if clusterSubnets[zone] == nil {
					//	return fmt.Errorf("EtcdMembers for %q is configured in zone %q, but that is not configured at the k8s-cluster level", etcd.Name, m.Zone)
					//}
					etcdNames[m.Name] = m
					etcdInstanceGroups[instanceGroupName] = m
				}

				if (len(etcdNames) % 2) == 0 {
					// Not technically a requirement, but doesn't really make sense to allow
					return fmt.Errorf("there should be an odd number of control-plane-zones, for etcd's quorum.  Hint: Use --zones and --control-plane-zones to declare worker and control plane node zones separately")
				}
			}
		}
	}

	configBase, err := clientset.VFSContext().BuildVfsPath(cluster.Spec.ConfigStore.Base)
	if err != nil {
		return fmt.Errorf("error parsing ConfigStore.Base %q: %v", cluster.Spec.ConfigStore.Base, err)
	}
	if !vfs.IsClusterReadable(configBase) {
		// We could implement this approach, but it seems better to get all clouds using cluster-readable storage
		return fmt.Errorf("ConfigStore.Base path is not cluster readable: %v", cluster.Spec.ConfigStore.Base)
	}

	keyStore, err := clientset.KeyStore(cluster)
	if err != nil {
		return err
	}

	if cluster.Spec.ConfigStore.Keypairs == "" {
		hasVFSPath, ok := keyStore.(fi.HasVFSPath)
		if !ok {
			// We will mirror to ConfigBase
			basedir := configBase.Join("pki")
			cluster.Spec.ConfigStore.Keypairs = basedir.Path()
		} else if vfs.IsClusterReadable(hasVFSPath.VFSPath()) {

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Fix cluster.spec.configStore.base to a valid VFS path with a supported scheme, e.g. s3://<bucket>/<prefix> or gs://<bucket>/<prefix>.
  2. Check KOPS_STATE_STORE is a correct, fully qualified URL (include bucket, correct scheme).
  3. Run with --v=2 to see the underlying BuildVfsPath error in the %v suffix for the exact parse problem.

Example fix

# before
configStore:
  base: s3:/my-bucket/cluster.example.com
# after
configStore:
  base: s3://my-bucket/cluster.example.com
Defensive patterns

Strategy: validation

Validate before calling

u, err := url.Parse(cluster.Spec.ConfigStore.Base)
if err != nil || u.Scheme == "" {
	return fmt.Errorf("configStore.base must be a fully qualified VFS path like s3://bucket/prefix")
}

Prevention

When it happens

Trigger: cluster.spec.configStore.base (formerly cluster.spec.configBase) is set to a string that BuildVfsPath cannot resolve — unknown scheme (e.g. typo'd "s4://bucket" or "file:/missing-slash"), or a relative path with no scheme in a context where none can be resolved.

Common situations: Typo in the S3/GCS/DO-spaces bucket URL scheme; copying a path between environments (memfs:// paths used outside tests); kops state store env var KOPS_STATE_STORE pointing at an invalid URI; older configs migrated to the configStore.base field with a stale value.

Related errors


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/8afd79c3e6bf97a3. Report an issue: GitHub.