kubernetes/kops · error
error creating instanceGroup: %v
Error message
error creating instanceGroup: %v
What it means
The InstanceGroup Create call failed with an error that is not IsAlreadyExists; RunCreate wraps the raw backend error with this prefix. It indicates the write to the state store itself failed, as opposed to a naming conflict.
Source
Thrown at cmd/kops/create.go:175
clusterName = v.ObjectMeta.Labels[kopsapi.LabelClusterName]
if clusterName == "" {
return fmt.Errorf("must specify %q label with cluster name to create instanceGroup", kopsapi.LabelClusterName)
}
cluster, err := clientset.GetCluster(ctx, clusterName)
if err != nil {
return fmt.Errorf("error querying cluster %q: %v", clusterName, err)
}
if cluster == nil {
return fmt.Errorf("cluster %q not found", clusterName)
}
_, err = clientset.InstanceGroupsFor(cluster).Create(ctx, v, metav1.CreateOptions{})
if err != nil {
if apierrors.IsAlreadyExists(err) {
return fmt.Errorf("instanceGroup %q already exists", v.ObjectMeta.Name)
}
return fmt.Errorf("error creating instanceGroup: %v", err)
}
fmt.Fprintf(&sb, "Created instancegroup/%s\n", v.ObjectMeta.Name)
case *kopsapi.SSHCredential:
clusterName = v.ObjectMeta.Labels[kopsapi.LabelClusterName]
if clusterName == "" {
return fmt.Errorf("must specify %q label with cluster name to create SSHCredential", kopsapi.LabelClusterName)
}
if v.Spec.PublicKey == "" {
return fmt.Errorf("spec.PublicKey is required")
}
cluster, err := clientset.GetCluster(ctx, clusterName)
if err != nil {
return err
}
sshCredentialStore, err := clientset.SSHCredentialStore(cluster)View on GitHub (pinned to 4c8573c808)
Solutions
- Inspect the wrapped %v detail for the root cause
- Re-verify write permissions on the state store bucket/path
- Retry the create after fixing credentials or connectivity
- Check cluster state integrity with `kops get cluster -oyaml`
Defensive patterns
Strategy: retry
Validate before calling
// verify write access before create
obj, _, err := clientset.InstanceGroupsFor(cluster).List(ctx, metav1.ListOptions{})
if err != nil {
return fmt.Errorf("no write access to state store: %v", err)
} Try / catch
err := retry.OnError(wait.Backoff{Steps: 3, Duration: time.Second},
func(err error) bool { return isTransient(err) },
func() error { _, err := igs.Create(ctx, ig, metav1.CreateOptions{}); return err }) Prevention
- Check IAM/bucket write permissions before automation runs
- Monitor state store health (throttling, quotas)
- Log the wrapped root-cause error for diagnosis
When it happens
Trigger: `kops create -f ig.yaml` where InstanceGroupsFor(cluster).Create fails due to state-store I/O errors, permission denied, invalid/invalidated backend configuration, or a validation rejection from the underlying clientset store.
Common situations: Expired cloud credentials mid-run; S3 bucket write permission removed; disk/full or throttled storage backend; corrupted cluster state in KOPS_STATE_STORE.
Related errors
- must specify %q label with cluster name to create instanceGr
- cluster %q not found
- instanceGroup %q already exists
- instanceGroup: %v does not exist (try adding --force flag)
- did not find owner for node %q
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/5152d6c3843e5076.
Report an issue: GitHub.