kubernetes/kops · error
found virtual network without address space
Error message
found virtual network without address space
What it means
The Azure virtualnetwork task's Find validates the discovered VNet shape before reuse: ID, Properties, and AddressSpace must all be present. This guard fires when an existing virtual network lacks an address space — a malformed/externally-modified VNet — so the task cannot compute address prefixes and refuses to adopt it (failed provisioning state is warned-and-ignored one branch earlier).
Source
Thrown at upup/pkg/fi/cloudup/azuretasks/virtualnetwork.go:82
break
}
}
if found == nil {
return nil, nil
}
if found.ID == nil {
return nil, fmt.Errorf("found virtual network without ID")
}
if found.Properties == nil {
return nil, fmt.Errorf("found virtual network without properties")
}
if found.Properties.ProvisioningState != nil && *found.Properties.ProvisioningState == network.ProvisioningStateFailed {
klog.Warningf("found virtual network %q in failed provisioning state", *n.Name)
return nil, nil
}
if found.Properties.AddressSpace == nil {
return nil, fmt.Errorf("found virtual network without address space")
}
addrPrefixes := found.Properties.AddressSpace.AddressPrefixes
if len(addrPrefixes) != 1 {
return nil, fmt.Errorf("expecting exactly 1 address prefix for %q, found %d: %+v", *n.Name, len(addrPrefixes), addrPrefixes)
}
return &VirtualNetwork{
Name: n.Name,
Lifecycle: n.Lifecycle,
Shared: n.Shared,
ResourceGroup: &ResourceGroup{
Name: n.ResourceGroup.Name,
},
CIDR: addrPrefixes[0],
Tags: found.Tags,
}, nil
}
View on GitHub (pinned to 4c8573c808)
Solutions
- Check the VNet's address space in the Azure portal
- Add an address range to the VNet if it genuinely has none
- Retry the find operation
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at upup/pkg/fi/cloudup/azuretasks/virtualnetwork.go:82 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/62cce68d29d29f2f.
Report an issue: GitHub.