kubernetes/kops · error
error writing updated addon configuration: %v
Error message
error writing updated addon configuration: %v
What it means
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.
Source
Thrown at pkg/apis/kops/registry/helpers.go:60
}
_, err := clientset.CreateCluster(ctx, cluster)
if err != nil {
return err
}
for _, ig := range groups {
_, err = clientset.InstanceGroupsFor(cluster).Create(ctx, ig, metav1.CreateOptions{})
if err != nil {
return fmt.Errorf("error writing updated instancegroup configuration: %v", err)
}
}
{
addonsClient := clientset.AddonsFor(cluster)
if err := addonsClient.Replace(addons); err != nil {
return fmt.Errorf("error writing updated addon configuration: %v", err)
}
}
return nil
}
View on GitHub (pinned to 4c8573c808)
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.
Defensive patterns
Strategy: retry
Validate before calling
// verify addons path is writable before Replace
addonPath, err := ConfigBase(vfs.Context, cluster)
if err != nil {
return err // state store base malformed/missing
}
if _, err := addonPath.Join("addons").ReadTree(); err != nil && !os.IsNotExist(err) {
return fmt.Errorf("addons path not readable: %v", err)
} Try / catch
err := addonsClient.Replace(addons)
if err != nil {
if isTransient(err) { // network/5xx/throttle
err = retry.Do(3, backoff, func() error { return addonsClient.Replace(addons) })
}
if err != nil {
return fmt.Errorf("error writing updated addon configuration: %v", err)
}
} Prevention
- 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.
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- error writing updated instancegroup configuration: %v
- error writing additional objects: %v
- error writing updated configuration: %v
- writing keyset: %v
- error fetching addons: %v
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/61b00c62f7b0f77b.
Report an issue: GitHub.