{"record":{"id":"61b00c62f7b0f77b","repo":"kubernetes/kops","slug":"error-writing-updated-addon-configuration-v","errorCode":null,"errorMessage":"error writing updated addon configuration: %v","messagePattern":"error writing updated addon configuration: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/apis/kops/registry/helpers.go","lineNumber":60,"sourceCode":"\t}\n\n\t_, err := clientset.CreateCluster(ctx, cluster)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfor _, ig := range groups {\n\t\t_, err = clientset.InstanceGroupsFor(cluster).Create(ctx, ig, metav1.CreateOptions{})\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error writing updated instancegroup configuration: %v\", err)\n\t\t}\n\t}\n\n\t{\n\t\taddonsClient := clientset.AddonsFor(cluster)\n\n\t\tif err := addonsClient.Replace(addons); err != nil {\n\t\t\treturn fmt.Errorf(\"error writing updated addon configuration: %v\", err)\n\t\t}\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":42,"sourceCodeEnd":66,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/apis/kops/registry/helpers.go#L42-L66","documentation":"CreateClusterConfig finishes by replacing the cluster's addon manifests through addonsClient.Replace(addons). If that write fails, the error is wrapped as \"error writing updated addon configuration\". At this point the cluster and all instance groups have already been written, so only addon registration in the state store failed.","triggerScenarios":"Calling CreateClusterConfig when the addons VFS path under the cluster's state store cannot be written: bad state-store permissions/credentials, missing kopsAddon files in the addon path, or an underlying storage error (S3 throttling, network failure).","commonSituations":"AWS credentials lacking s3:PutObject on the state bucket; transient S3 5xx during `kops create cluster`; a corrupted/locked addons manifest left by a previous failed run; read-only mounted file-backed state store.","solutions":["Check the wrapped cause and validate state-store access: run `kops get cluster <name>` and confirm write permissions on the state bucket/prefix.","Re-run the command; Replace is idempotent since it overwrites the addon manifest, so a retry after fixing connectivity is safe.","If credentials are the cause, refresh them (aws sso login / new session) and ensure the bucket policy allows PutObject for the addons prefix.","As a last resort, delete the addons key under the cluster state path and re-run `kops create cluster` or `kops update cluster` to repopulate it."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// verify addons path is writable before Replace\naddonPath, err := ConfigBase(vfs.Context, cluster)\nif err != nil {\n\treturn err // state store base malformed/missing\n}\nif _, err := addonPath.Join(\"addons\").ReadTree(); err != nil && !os.IsNotExist(err) {\n\treturn fmt.Errorf(\"addons path not readable: %v\", err)\n}","typeGuard":null,"tryCatchPattern":"err := addonsClient.Replace(addons)\nif err != nil {\n\tif isTransient(err) { // network/5xx/throttle\n\t\terr = retry.Do(3, backoff, func() error { return addonsClient.Replace(addons) })\n\t}\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error writing updated addon configuration: %v\", err)\n\t}\n}","preventionTips":["Refresh cloud credentials before long-running create operations.","Keep addon manifests valid kopsAddon objects; Replace overwrites, so safe retries are possible.","Monitor for throttling on the state bucket (S3 5xx/SlowDown) and back off.","Verify the state-store prefix is writable and not read-only mounted."],"tags":["state-store","addons","cluster-creation","persistence"],"backgroundTag":"state-store-write-failed","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"}