kubernetes/kops · error
parsing configStore.base %q: %w
Error message
parsing configStore.base %q: %w
What it means
channelList resolves cluster.spec.configStore.base into a vfs path via vfs.Context.BuildVfsPath so the bootstrap channel URL is built consistently. If the base string is not a valid/known VFS path (bad scheme, empty, malformed URL), the parse fails and the whole channels build aborts.
Source
Thrown at pkg/model/components/channels/model.go:91
if err != nil {
return fmt.Errorf("marshaling kops-channels pod: %w", err)
}
c.AddTask(&fitasks.ManagedFile{
Contents: fi.NewBytesResource(manifest),
Lifecycle: b.Lifecycle,
Location: new(channelsManifestPath),
Name: new("manifests-channels-kops-channels"),
})
return nil
}
// channelList returns the bootstrap channel plus cluster.Spec.Addons. The bootstrap URL is
// built via vfs path joining so toolbox_enroll's identity comparison stays byte-identical.
func (b *ChannelsBuilder) channelList() ([]string, error) {
configBase, err := vfs.Context.BuildVfsPath(b.Cluster.Spec.ConfigStore.Base)
if err != nil {
return nil, fmt.Errorf("parsing configStore.base %q: %w", b.Cluster.Spec.ConfigStore.Base, err)
}
channels := []string{
configBase.Join("addons", "bootstrap-channel.yaml").Path(),
}
for i := range b.Cluster.Spec.Addons {
channels = append(channels, b.Cluster.Spec.Addons[i].Manifest)
}
return channels, nil
}
func (b *ChannelsBuilder) buildPod(channels []string) (*v1.Pod, error) {
image := b.AssetBuilder.RemapImage("registry.k8s.io/kops/channels:" + kopsroot.KopsVersionImageTag())
pod := &v1.Pod{
TypeMeta: metav1.TypeMeta{
APIVersion: "v1",
Kind: "Pod",
},View on GitHub (pinned to 4c8573c808)
Solutions
- Fix the state store URL: full scheme + bucket, e.g. s3://mybucket or gs://mybucket
- Verify with `kops get clusters --state <url>` that the base is readable
- If using GCS/azure stores, ensure the corresponding cloud provider support is present in your kops build
- Export KOPS_STATE_STORE correctly in the environment before running
Example fix
# before configStore: base: s3:/mycluster-state # after configStore: base: s3://mycluster-state
Defensive patterns
Strategy: validation
Validate before calling
if _, err := vfs.Context.BuildVfsPath(cluster.Spec.ConfigStore.Base); err != nil {
return fmt.Errorf("invalid KOPS state store %q: %w", cluster.Spec.ConfigStore.Base, err)
} Type guard
func validStateStore(base string) bool {
_, err := vfs.Context.BuildVfsPath(base)
return base != "" && err == nil
} Try / catch
if err := buildChannels(); err != nil {
if strings.Contains(err.Error(), "parsing configStore.base") {
// check KOPS_STATE_STORE scheme and bucket before retry
}
return err
} Prevention
- Always use full scheme+bucket for --state (s3://bucket, gs://bucket)
- Export KOPS_STATE_STORE once in shell profiles instead of ad-hoc flags
- Test state store access with `kops get clusters` before cluster operations
When it happens
Trigger: Build (channels addon) runs and vfs.Context.BuildVfsPath is given a configStore.base with an unsupported scheme (e.g. gs:// without GCS support, misspelled s3://, or an empty/relative path).
Common situations: Typo in --state / KOPS_STATE_STORE (e.g. 's3:/bucket' with single slash); using a store type the binary wasn't compiled with; empty ConfigStore.Base in a hand-written cluster manifest.
Related errors
- error reading full cluster spec for %q: %v
- reading kops-channels manifest %s: %w
- error parsing ConfigStore.Base %q: %v
- error reading state store: %v
- error building ConfigStore.Base for cluster: %v
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/b4553984ca128524.
Report an issue: GitHub.