{"record":{"id":"e2b46312d3e1599f","repo":"kubernetes/kops","slug":"expected-azureblob-configstore-base-for-azure-c","errorCode":null,"errorMessage":"expected azureblob:// ConfigStore.Base for Azure cluster, got %q","messagePattern":"expected azureblob:// ConfigStore\\.Base for Azure cluster, got %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/defaults.go","lineNumber":181,"sourceCode":"\t\tc.Spec.CloudProvider.Azure.StorageAccountID = *sa.ID\n\t}\n\n\treturn ensureKubernetesVersion(vfsContext, c)\n}\n\n// azureStorageAccountFromConfigStore extracts the Azure storage account\n// from an azureblob:// ConfigStore.Base.\nfunc azureStorageAccountFromConfigStore(vfsContext *vfs.VFSContext, configBase string) (string, error) {\n\tif configBase == \"\" {\n\t\treturn \"\", fmt.Errorf(\"ConfigStore.Base is not set; cannot determine Azure storage account\")\n\t}\n\tp, err := vfsContext.BuildVfsPath(configBase)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"parsing ConfigStore.Base %q: %w\", configBase, err)\n\t}\n\tazurePath, ok := p.(*vfs.AzureBlobPath)\n\tif !ok {\n\t\treturn \"\", fmt.Errorf(\"expected azureblob:// ConfigStore.Base for Azure cluster, got %q\", configBase)\n\t}\n\treturn azurePath.Account(), nil\n}\n\n// ensureKubernetesVersion populates KubernetesVersion, if it is not already set\n// It will be populated with the latest stable kubernetes version, or the version from the channel\nfunc ensureKubernetesVersion(vfsContext *vfs.VFSContext, c *kops.Cluster) error {\n\tif c.Spec.KubernetesVersion == \"\" {\n\t\tif c.Spec.Channel != \"\" {\n\t\t\tchannel, err := kops.LoadChannel(vfsContext, c.Spec.Channel)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tkubernetesVersion := kops.RecommendedKubernetesVersion(channel, kopsversion.Version)\n\t\t\tif kubernetesVersion != nil {\n\t\t\t\tc.Spec.KubernetesVersion = kubernetesVersion.String()\n\t\t\t\tklog.Infof(\"Using KubernetesVersion %q from channel %q\", c.Spec.KubernetesVersion, c.Spec.Channel)\n\t\t\t} else {","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/defaults.go#L163-L199","documentation":"azureStorageAccountFromConfigStore resolves the Azure storage account name backing the cluster's state store. It builds a VFS path from ConfigStore.Base and requires it to be an *vfs.AzureBlobPath; anything else (s3, gs, file, memfs) means the state store is not Azure blob storage, so the Azure account name cannot be derived and the cluster creation aborts.","triggerScenarios":"Running `kops create cluster` with cloud=azure but a ConfigStore.Base (state store) that is not an azureblob:// URL, e.g. --state=s3://bucket or the default file store; also calling PerformAssignments with a configBase pointing at a non-Azure VFS path.","commonSituations":"Copying an AWS/GCP cluster config and switching the cloud to Azure without changing the state store; forgetting --state=azureblob://<account>; local testing with memfs/file state stores while targeting Azure.","solutions":["Set the state store to an Azure Blob Storage URL, e.g. kops create cluster --state azureblob://<storage-account-name> ...","Verify KOPS_STATE_STORE env var is azureblob://... for Azure clusters, not s3:// or gs://","Export the cluster config and correct cluster.spec.configBase, then update the cluster","If testing locally, create a local Azure storage emulator path or use a cloud matching your state store"],"exampleFix":"// before\nkops create cluster --cloud azure --state s3://my-kops-state ...  # error\n// after\nkops create cluster --cloud azure --state azureblob://mystorageaccount ...","handlingStrategy":"validation","validationCode":"if !strings.HasPrefix(configBase, \"azureblob://\") {\n    return fmt.Errorf(\"Azure cluster requires azureblob:// state store, got %q\", configBase)\n}","typeGuard":"func isAzureBlobPath(p vfs.VFSPath) (*vfs.AzureBlobPath, bool) {\n    ap, ok := p.(*vfs.AzureBlobPath)\n    return ap, ok\n}","tryCatchPattern":null,"preventionTips":["Always pass --state azureblob://<account> for Azure clusters","Pin KOPS_STATE_STORE per cloud in CI scripts","Sanity-check configBase scheme before PerformAssignments"],"tags":["azure","state-store","vfs","configuration"],"backgroundTag":"state-store-mismatch","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"}