kubernetes/kops · error
Failed to find external network: %v
Error message
Failed to find external network: %v
What it means
RenderOpenstack in floatingip.go:234 wraps an error from cloud.GetExternalNetwork() when creating a new FloatingIP task (a == nil). A floating IP must be allocated from an external (public) network, and kops could not resolve which configured network is the external one.
Source
Thrown at upup/pkg/fi/cloudup/openstacktasks/floatingip.go:234
}
func (_ *FloatingIP) ShouldCreate(a, e, changes *FloatingIP) (bool, error) {
if a == nil {
return true, nil
}
if changes.Name != nil {
return true, nil
}
return false, nil
}
func (f *FloatingIP) RenderOpenstack(t *openstack.OpenstackAPITarget, a, e, changes *FloatingIP) error {
cloud := t.Cloud
if a == nil {
external, err := cloud.GetExternalNetwork()
if err != nil {
return fmt.Errorf("Failed to find external network: %v", err)
}
opts := l3floatingip.CreateOpts{
FloatingNetworkID: external.ID,
Description: fi.ValueOf(e.Name),
}
if e.LB != nil {
opts.PortID = fi.ValueOf(e.LB.PortID)
}
// instance floatingips comes from the same subnet as the kubernetes API floatingip
lbSubnet, err := cloud.GetLBFloatingSubnet()
if err != nil {
return fmt.Errorf("Failed to find floatingip subnet: %v", err)
}
if lbSubnet != nil {
opts.SubnetID = lbSubnet.IDView on GitHub (pinned to 4c8573c808)
Solutions
- Set the correct external network name in the cluster spec (cluster.spec.networkID / cloudConfig) or via `kops edit cluster`, matching `openstack network list --external`.
- Ask the cloud admin to set router:external on the intended public network and grant the project access.
- Verify credentials/project scope allow listing networks.
- Rerun `kops update cluster` after fixing the config.
Example fix
// before (cluster spec) cloudConfig: externalNetwork: "pubnet" # wrong name // after cloudConfig: externalNetwork: "public" # matches `openstack network list --external`
Defensive patterns
Strategy: validation
Validate before calling
// confirm an external network exists and is visible before creating FIPs
nets, err := cloud.ListNetworks(networks.ListOpts{RouterExternal: true})
if err != nil || len(nets) == 0 {
return fmt.Errorf("no external network visible to this project; set cloudConfig externalNetwork")
} Type guard
func hasExternalNetwork(nets []networks.Network) bool {
for _, n := range nets {
if n.External {
return true
}
}
return false
} Try / catch
err := f.RenderOpenstack(target, a, e, changes)
if err != nil && strings.Contains(err.Error(), "Failed to find external network") {
// fix cluster.spec cloudConfig externalNetwork, then re-run update
} Prevention
- Run `openstack network list --external` and put that exact name in the cluster spec
- Ask the admin to mark the public network router:external and grant project access
- Validate the cluster spec with `kops update cluster` (dry-run) before applying
- Re-check after OpenStack upgrades that network names are unchanged
When it happens
Trigger: GetExternalNetwork fails because no network in the project has router:external=true, the cluster config's external network name doesn't match, or the Neutron list-networks call itself errored.
Common situations: Missing or misnamed `[cloudConfig] externalNetwork` in the kops cluster spec; project lacks permission to see the shared external network; OpenStack admin forgot to mark the public network as external; typo after renaming the network.
Related errors
- did not find floatingsubnet for external router
- Failed to find floatingip subnet: %v
- could not establish floating network id
- GetApiIngressStatus: Failed to list floating IP's: %v
- did not find floatingsubnet for LB
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/31574c0342380325.
Report an issue: GitHub.