{"record":{"id":"c4e45facee8503d5","repo":"kubernetes/kops","slug":"error-finding-address-for-v-v","errorCode":null,"errorMessage":"error finding address for %v: %v","messagePattern":"error finding address for (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/model/bootstrapscript.go","lineNumber":87,"sourceCode":"\tnodeupConfig fi.CloudupTaskDependentResource\n\t// nodeupScript contains the nodeup bootstrap script, for use with Karpenter.\n\tnodeupScript fi.CloudupTaskDependentResource\n}\n\nvar (\n\t_ fi.CloudupTask            = &BootstrapScript{}\n\t_ fi.HasName                = &BootstrapScript{}\n\t_ fi.CloudupHasDependencies = &BootstrapScript{}\n)\n\n// kubeEnv returns the boot config for the instance group\nfunc (b *BootstrapScript) kubeEnv(cluster *kops.Cluster, ig *kops.InstanceGroup, c *fi.CloudupContext) (*nodeup.BootConfig, error) {\n\twellKnownAddresses := make(WellKnownAddresses)\n\n\tfor _, hasAddress := range b.hasAddressTasks {\n\t\taddresses, err := hasAddress.FindAddresses(c)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error finding address for %v: %v\", hasAddress, err)\n\t\t}\n\t\tif len(addresses) == 0 {\n\t\t\t// Such tasks won't have an address in dry-run mode, until the resource is created\n\t\t\tklog.V(2).Infof(\"Task did not have an address: %v\", hasAddress)\n\t\t\tcontinue\n\t\t}\n\n\t\tklog.V(8).Infof(\"Resolved alternateNames %q for %q\", addresses, hasAddress)\n\n\t\tfor _, wellKnownService := range hasAddress.GetWellKnownServices() {\n\t\t\twellKnownAddresses[wellKnownService] = append(wellKnownAddresses[wellKnownService], addresses...)\n\t\t}\n\t}\n\n\tfor k := range wellKnownAddresses {\n\t\tsort.Strings(wellKnownAddresses[k])\n\t}\n","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/model/bootstrapscript.go#L69-L105","documentation":"When generating node bootstrap configuration, kubeEnv iterates over tasks implementing HasAddress and calls FindAddresses to build the well-known-addresses map. If a task's address lookup returns an error, it is wrapped as \"error finding address for <task>: <cause>\" and nodeup config generation fails.","triggerScenarios":"Running `kops update cluster` where an address-providing task (e.g. load balancer, bastion, or API server task) fails FindAddresses due to an underlying cloud/API error or missing cloud state.","commonSituations":"Cloud API outages or throttling during cluster creation; credentials lacking permission to describe load balancers; partial cluster state where a referenced resource does not exist in the cloud account.","solutions":["Read the wrapped cause (%v) to identify the underlying task and cloud error, then fix that first.","Verify cloud credentials and IAM permissions can describe the relevant resources (e.g. ELB/API LB).","Re-run `kops update cluster` after transient cloud API failures; delete stale/recreated resources that no longer match cluster state."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"if err := checkCloudCredentials(ctx); err != nil {\n  return fmt.Errorf(\"cloud credentials/permissions insufficient before update: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"if err := kopsUpdate(); err != nil {\n  if strings.Contains(err.Error(), \"error finding address for\") {\n    // transient cloud API failure: log cause, back off and retry\n    klog.Warningf(\"address lookup failed: %v; retrying\", err)\n    time.Sleep(backoff)\n    return kopsUpdate()\n  }\n  return err\n}","preventionTips":["Grant the kops principal permissions to describe load balancers and instances.","Retry updates on transient cloud API throttling/outages.","Keep cluster state consistent with real cloud resources (avoid manual deletions)."],"tags":["bootstrap","nodeup","addresses","cloud-api"],"backgroundTag":"address-lookup-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"}