kubernetes/kops · error
Address had no IP: %v
Error message
Address had no IP: %v
What it means
After resolving the referenced Address, kOps checks that it actually carries an IP. If addr.IPAddress is empty, this error fires. A GCE Address resource should always have an address once reserved; an empty value indicates a malformed lookup result or a partially-created address.
Source
Thrown at upup/pkg/fi/cloudup/gcetasks/forwardingrule.go:198
return fmt.Errorf("cannot specify both %q and %q for forwarding rule target.", o.Target, e.BackendService)
}
o.BackendService = e.BackendService.URL(t.Cloud)
}
if e.IPAddress != nil {
o.IPAddress = fi.ValueOf(e.IPAddress.IPAddress)
if o.IPAddress == "" {
addr, err := e.IPAddress.find(t.Cloud)
if err != nil {
return fmt.Errorf("error finding Address %q: %v", e.IPAddress, err)
}
if addr == nil {
return fmt.Errorf("Address %q was not found", e.IPAddress)
}
o.IPAddress = fi.ValueOf(addr.IPAddress)
if o.IPAddress == "" {
return fmt.Errorf("Address had no IP: %v", e.IPAddress)
}
}
}
if o.IPAddress != "" && e.RuleIPAddress != nil {
return fmt.Errorf("Specified both IP Address and rule-managed IP address: %v, %v", e.IPAddress, *e.RuleIPAddress)
}
if e.RuleIPAddress != nil {
o.IPAddress = *e.RuleIPAddress
}
if e.Network != nil {
project := t.Cloud.Project()
if e.Network.Project != nil {
project = *e.Network.Project
}
o.Network = e.Network.URL(project)
}
View on GitHub (pinned to 4c8573c808)
Solutions
- Re-run kops update — the address may have been mid-reservation during the previous attempt.
- Delete and recreate the GCE Address if it persistently reports no IP.
- Set the ipAddress explicitly in the spec to bypass resolution.
- Check gcloud compute addresses describe <name> to verify RESERVATION state.
Defensive patterns
Strategy: retry
Validate before calling
// before applying, confirm the address reports an IP: // gcloud compute addresses describe ADDR --region=R --format="value(address)"
Try / catch
err := kopsUpdate()
if err != nil && strings.Contains(err.Error(), "Address had no IP") {
time.Sleep(10 * time.Second)
// retry once; the address may have been mid-reservation
if err := kopsUpdate(); err != nil {
log.Fatalf("address has no IP after retry: %v", err)
}
} Prevention
- Re-run apply after transient address-state errors before deeper debugging.
- Recreate GCE addresses that persistently report no IP.
- Prefer explicit ipAddress values in specs to avoid resolution races.
When it happens
Trigger: find() returned a non-nil Address whose IPAddress string is empty — e.g. a stale/partial resource state or an unexpected API response shape — while rendering a ForwardingRule whose spec gave no concrete IP.
Common situations: Rare race where the Address exists in the API listing but not yet fully reserved; corrupted cached state; version skew between kops and the API response fields.
Related errors
- error finding Address with IP=%q: %w
- error finding Address %q: %v
- Address %q was not found
- error getting ForwardingRule %q: %w
- failed to list backend services: %w
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/2f3e99875ac24bec.
Report an issue: GitHub.