{"record":{"id":"d9bd75b41a8a8b61","repo":"kubernetes/kops","slug":"error-creating-load-balancer-with-name-s-error","errorCode":null,"errorMessage":"Error creating load balancer with Name=%s, Error=%v","messagePattern":"Error creating load balancer with Name=(.+?), Error=(.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/dotasks/loadbalancer.go","lineNumber":194,"sourceCode":"\t\tvpcUUID, err = t.Cloud.GetVPCUUID(fi.ValueOf(e.NetworkCIDR), fi.ValueOf(e.VPCName))\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"Error fetching vpcUUID from network cidr=%s\", fi.ValueOf(e.NetworkCIDR))\n\t\t}\n\t} else if fi.ValueOf(e.VPCUUID) != \"\" {\n\t\tvpcUUID = fi.ValueOf(e.VPCUUID)\n\t}\n\n\tloadBalancerService := t.Cloud.LoadBalancersService()\n\tloadbalancer, _, err := loadBalancerService.Create(context.TODO(), &godo.LoadBalancerRequest{\n\t\tName:            fi.ValueOf(e.Name),\n\t\tRegion:          fi.ValueOf(e.Region),\n\t\tTag:             fi.ValueOf(e.DropletTag),\n\t\tVPCUUID:         vpcUUID,\n\t\tForwardingRules: Rules,\n\t\tHealthCheck:     HealthCheck,\n\t})\n\tif err != nil {\n\t\treturn fmt.Errorf(\"Error creating load balancer with Name=%s, Error=%v\", fi.ValueOf(e.Name), err)\n\t}\n\n\te.ID = new(loadbalancer.ID)\n\te.IPAddress = new(loadbalancer.IP) // This will be empty on create, but will be filled later on FindAddresses invokation.\n\n\tklog.V(2).Infof(\"load balancer for DO created with id: %s\", loadbalancer.ID)\n\treturn nil\n}\n\n// GetWellKnownServices implements fi.HasAddress::GetWellKnownServices.\n// It indicates which services we support with this load balancer.\nfunc (lb *LoadBalancer) GetWellKnownServices() []wellknownservices.WellKnownService {\n\treturn lb.WellKnownServices\n}\n\nfunc (lb *LoadBalancer) FindAddresses(c *fi.CloudupContext) ([]string, error) {\n\tcloud := c.T.Cloud.(do.DOCloud)\n\tloadBalancerService := cloud.LoadBalancersService()","sourceCodeStart":176,"sourceCodeEnd":212,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/dotasks/loadbalancer.go#L176-L212","documentation":"The DigitalOcean LoadBalancer task's RenderDO wraps the LoadBalancersService.Create failure. It fires when the DO API rejects load-balancer creation (invalid forwarding rules, region/tag mismatch, quota, permissions); the LB name and underlying error are logged/returned so the apply fails and retries.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/dotasks/loadbalancer.go:194 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped DO API error for the rejection reason","Verify forwarding rules, health check, region, and VPC settings","Check LB quota for the account","Retry after fixing the configuration"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}