{"record":{"id":"5152d6c3843e5076","repo":"kubernetes/kops","slug":"error-creating-instancegroup-v","errorCode":null,"errorMessage":"error creating instanceGroup: %v","messagePattern":"error creating instanceGroup: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/kops/create.go","lineNumber":175,"sourceCode":"\t\t\t\tclusterName = v.ObjectMeta.Labels[kopsapi.LabelClusterName]\n\t\t\t\tif clusterName == \"\" {\n\t\t\t\t\treturn fmt.Errorf(\"must specify %q label with cluster name to create instanceGroup\", kopsapi.LabelClusterName)\n\t\t\t\t}\n\t\t\t\tcluster, err := clientset.GetCluster(ctx, clusterName)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"error querying cluster %q: %v\", clusterName, err)\n\t\t\t\t}\n\n\t\t\t\tif cluster == nil {\n\t\t\t\t\treturn fmt.Errorf(\"cluster %q not found\", clusterName)\n\t\t\t\t}\n\n\t\t\t\t_, err = clientset.InstanceGroupsFor(cluster).Create(ctx, v, metav1.CreateOptions{})\n\t\t\t\tif err != nil {\n\t\t\t\t\tif apierrors.IsAlreadyExists(err) {\n\t\t\t\t\t\treturn fmt.Errorf(\"instanceGroup %q already exists\", v.ObjectMeta.Name)\n\t\t\t\t\t}\n\t\t\t\t\treturn fmt.Errorf(\"error creating instanceGroup: %v\", err)\n\t\t\t\t}\n\t\t\t\tfmt.Fprintf(&sb, \"Created instancegroup/%s\\n\", v.ObjectMeta.Name)\n\n\t\t\tcase *kopsapi.SSHCredential:\n\t\t\t\tclusterName = v.ObjectMeta.Labels[kopsapi.LabelClusterName]\n\t\t\t\tif clusterName == \"\" {\n\t\t\t\t\treturn fmt.Errorf(\"must specify %q label with cluster name to create SSHCredential\", kopsapi.LabelClusterName)\n\t\t\t\t}\n\t\t\t\tif v.Spec.PublicKey == \"\" {\n\t\t\t\t\treturn fmt.Errorf(\"spec.PublicKey is required\")\n\t\t\t\t}\n\n\t\t\t\tcluster, err := clientset.GetCluster(ctx, clusterName)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\n\t\t\t\tsshCredentialStore, err := clientset.SSHCredentialStore(cluster)","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/cmd/kops/create.go#L157-L193","documentation":"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.","triggerScenarios":"`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.","commonSituations":"Expired cloud credentials mid-run; S3 bucket write permission removed; disk/full or throttled storage backend; corrupted cluster state in KOPS_STATE_STORE.","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`"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// verify write access before create\nobj, _, err := clientset.InstanceGroupsFor(cluster).List(ctx, metav1.ListOptions{})\nif err != nil {\n    return fmt.Errorf(\"no write access to state store: %v\", err)\n}","typeGuard":null,"tryCatchPattern":"err := retry.OnError(wait.Backoff{Steps: 3, Duration: time.Second},\n    func(err error) bool { return isTransient(err) },\n    func() error { _, err := igs.Create(ctx, ig, metav1.CreateOptions{}); return err })","preventionTips":["Check IAM/bucket write permissions before automation runs","Monitor state store health (throttling, quotas)","Log the wrapped root-cause error for diagnosis"],"tags":["kops","cli","instancegroup","state-store-write"],"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"}