{"record":{"id":"10d8f2f74fd09b06","repo":"kubernetes/kops","slug":"error-parsing-configstore-base-q-v","errorCode":null,"errorMessage":"error parsing ConfigStore.Base %q: %v","messagePattern":"error parsing ConfigStore\\.Base %q: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/apis/kops/registry/registry.go","lineNumber":42,"sourceCode":"\t\"k8s.io/kops/util/pkg/vfs\"\n)\n\nconst (\n\t// Path for the user-specified cluster spec\n\tPathCluster = \"config\"\n\t// PathClusterCompleted is the path for completed cluster spec in the state store.\n\tPathClusterCompleted = \"cluster-completed.spec\"\n\t// PathKopsVersionUpdated is the path for the version of kops last used to apply the cluster.\n\tPathKopsVersionUpdated = \"kops-version.txt\"\n)\n\nfunc ConfigBase(vfsContext *vfs.VFSContext, c *api.Cluster) (vfs.Path, error) {\n\tif c.Spec.ConfigStore.Base == \"\" {\n\t\treturn nil, field.Required(field.NewPath(\"spec\", \"configStore\", \"base\"), \"\")\n\t}\n\tconfigBase, err := vfsContext.BuildVfsPath(c.Spec.ConfigStore.Base)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error parsing ConfigStore.Base %q: %v\", c.Spec.ConfigStore.Base, err)\n\t}\n\treturn configBase, nil\n}\n","sourceCodeStart":24,"sourceCodeEnd":46,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/apis/kops/registry/registry.go#L24-L46","documentation":"ConfigBase in pkg/apis/kops/registry/registry.go resolves the cluster's spec.configStore.base string into a vfs.Path via vfsContext.BuildVfsPath. The cluster was created without a ConfigStore.Base (which also yields a separate Required-field error) or the base string is not a parseable VFS path (e.g. malformed s3:// gs:// or memfs:// URL), producing \"error parsing ConfigStore.Base %q\".","triggerScenarios":"Calling ConfigBase (directly or via SecretStore, pkiPath, fullClusterSpecs, DeleteCluster) with an api.Cluster whose Spec.ConfigStore.Base contains an unparseable scheme/path — for example \"s3:/bucket\" (single slash), \"httpx://...\", or a path with invalid characters that the VFS context cannot map.","commonSituations":"Hand-edited cluster manifest with a typo in the state store URL; migrating clusters between kOps versions where ConfigStore.Base was serialized incorrectly; using a state store scheme not compiled into the binary; constructing Cluster structs programmatically with an empty or relative base.","solutions":["Print/inspect the quoted %q value in the error and fix spec.configStore.base to a valid VFS path, e.g. s3://<bucket>/<prefix> (double slashes).","Use the --state flag / KOPS_STATE_STORE env var and let kops set ConfigStore.Base instead of editing manifests by hand.","Confirm the scheme is supported by this build (s3, gs, azure, do, hetzner, openstack, memfs, file).","If loading from YAML/JSON, re-export the cluster spec with `kops get -o yaml` to normalize the field."],"exampleFix":"// before (cluster.yaml)\nspec:\n  configStore:\n    base: s3:/my-state-bucket/clusters\n// after\nspec:\n  configStore:\n    base: s3://my-state-bucket/clusters","handlingStrategy":"validation","validationCode":"func validateConfigBase(c *api.Cluster) error {\n\tbase := c.Spec.ConfigStore.Base\n\tif base == \"\" {\n\t\treturn field.Required(field.NewPath(\"spec\", \"configStore\", \"base\"), \"\")\n\t}\n\tif _, err := vfs.Context.BuildVfsPath(base); err != nil {\n\t\treturn fmt.Errorf(\"invalid ConfigStore.Base %q: %v\", base, err)\n\t}\n\treturn nil\n}","typeGuard":null,"tryCatchPattern":"configBase, err := ConfigBase(vfs.Context, cluster)\nif err != nil {\n\treturn fmt.Errorf(\"cannot resolve state store for %s: %w (check spec.configStore.base / --state)\", cluster.Name, err)\n}","preventionTips":["Always use s3://, gs://, etc. with double slashes, never single-slash schemes.","Prefer --state or KOPS_STATE_STORE over hand-editing spec.configStore.base.","Confirm the state-store backend is compiled into your kops binary.","Round-trip manifests via `kops get -o yaml` instead of writing them by hand."],"tags":["vfs","state-store","config","url-parsing"],"backgroundTag":"invalid-state-store-path","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}