kubernetes/kops · error
error creating TargetPool: %v
Error message
error creating TargetPool: %v
What it means
After the TargetPool Insert call succeeds, RenderGCE waits for the GCE operation via WaitForOp; failure there is wrapped as 'error creating TargetPool: %v'. The insert was accepted but the operation did not complete successfully.
Source
Thrown at upup/pkg/fi/cloudup/gcetasks/targetpool.go:100
}
func (_ *TargetPool) RenderGCE(t *gce.GCEAPITarget, a, e, changes *TargetPool) error {
name := fi.ValueOf(e.Name)
o := &compute.TargetPool{
Name: name,
}
if a == nil {
klog.V(4).Infof("Creating TargetPool %q", o.Name)
op, err := t.Cloud.Compute().TargetPools().Insert(t.Cloud.Project(), t.Cloud.Region(), o)
if err != nil {
return fmt.Errorf("error creating TargetPool %q: %v", name, err)
}
if err := t.Cloud.WaitForOp(op); err != nil {
return fmt.Errorf("error creating TargetPool: %v", err)
}
} else {
return fmt.Errorf("cannot apply changes to TargetPool: %v", changes)
}
return nil
}
type terraformTargetPool struct {
Name string `cty:"name"`
HealthChecks []*terraformWriter.Literal `cty:"health_checks"`
}
func (_ *TargetPool) RenderTerraform(t *terraform.TerraformTarget, a, e, changes *TargetPool) error {
name := fi.ValueOf(e.Name)
tf := &terraformTargetPool{
Name: name,View on GitHub (pinned to 4c8573c808)
Solutions
- Describe the failed operation: `gcloud compute operations describe <op> --region <region>` for the root cause
- Retry `kops update cluster`; GCE target pools are idempotent to re-create attempts via kOps
- Check for concurrent automation modifying the same region's resources
- Verify service account quotas and permissions
Defensive patterns
Strategy: retry
Try / catch
if err := t.Cloud.WaitForOp(op); err != nil { klog.Warningf("insert op failed, will retry on next apply: %v", err); return err } Prevention
- Check `gcloud compute operations list` for failed operations after an apply
- Avoid concurrent infrastructure automation in the same project/region
- Retry transient failures; kOps reconciles idempotently
When it happens
Trigger: cloud.WaitForOp(op) after TargetPools().Insert fails: the GCE operation finished with an error state (e.g. backend validation) or the polling API call errored (transient outage, auth).
Common situations: Transient GCP regional outage during `kops update cluster`; operation-level permission/quota issues that only appear at execution time; concurrent modifications to the same project's networking resources.
Related errors
- error getting TargetPool %q: %v
- error creating TargetPool %q: %v
- cannot apply changes to TargetPool: %v
- creating gce IPAM controller: %w
- error building compute API client: %v
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/e6f9d119b033d58f.
Report an issue: GitHub.