kubernetes/kops · error
could not establish floating network id
Error message
could not establish floating network id
What it means
Thrown in setFloatingIPSupport when the cluster config names a floating network (spec.Loadbalancer.FloatingNetwork) but kOps cannot resolve that name to exactly one Neutron network, so FloatingNetworkID cannot be derived. The error is returned when the ListNetworks call fails OR the result count != 1.
Source
Thrown at upup/pkg/fi/cloudup/openstack/cloud.go:478
}
}
func buildLoadBalancerClient(c *openstackCloud, spec *kops.OpenstackSpec, provider *gophercloud.ProviderClient, region string) error {
if spec == nil || spec.Loadbalancer == nil {
klog.V(2).Infof("Loadbalancer support for OpenStack disabled")
return nil
}
octavia := false
if spec.Router != nil {
if spec.Loadbalancer.FloatingNetworkID == nil &&
spec.Loadbalancer.FloatingNetwork != nil {
// This field is derived
lbNet, err := c.ListNetworks(networks.ListOpts{
Name: fi.ValueOf(spec.Loadbalancer.FloatingNetwork),
})
if err != nil || len(lbNet) != 1 {
return fmt.Errorf("could not establish floating network id")
}
spec.Loadbalancer.FloatingNetworkID = new(lbNet[0].ID)
}
if spec.Loadbalancer.UseOctavia != nil {
octavia = fi.ValueOf(spec.Loadbalancer.UseOctavia)
}
if spec.Loadbalancer.FloatingSubnet != nil {
c.floatingSubnet = spec.Loadbalancer.FloatingSubnet
}
} else if fi.ValueOf(spec.Loadbalancer.UseOctavia) {
return fmt.Errorf("cluster configured to use octavia, but router was not configured")
}
c.useOctavia = octavia
var lbClient *gophercloud.ServiceClient
if octavia {
klog.V(2).Infof("Openstack using Octavia lbaasv2 api")View on GitHub (pinned to 4c8573c808)
Solutions
- Run 'openstack network list --name <FloatingNetwork>' and confirm exactly one network matches; correct the name in the cluster spec
- Use the network ID instead of the name if names are ambiguous
- Check the project has permission to list the external network
- If err != nil, inspect the underlying Neutron error (auth/outage) before retrying
Example fix
// before
spec.Loadbalancer.FloatingNetwork = fi.String("pub-net") // typo or ambiguous
// after
spec.Loadbalancer.FloatingNetwork = fi.String("public-network-1") // verified via 'openstack network list' Defensive patterns
Strategy: validation
Validate before calling
// pre-check the floating network name resolves uniquely
nets, err := néutron.ListNetworks(networks.ListOpts{Name: floatingNetName})
if err != nil || len(nets) != 1 { return fmt.Errorf("floating network %q must match exactly one network", floatingNetName) }
spec.Loadbalancer.FloatingNetworkID = nets[0].ID Try / catch
// go
if err != nil && strings.Contains(err.Error(), "could not establish floating network id") {
return fmt.Errorf("check spec.Loadbalancer.FloatingNetwork name: %w", err)
} Prevention
- Use FloatingNetworkID (UUID) instead of names when possible
- Validate names with 'openstack network list --name' before applying the spec
- Avoid duplicate network names across projects
When it happens
Trigger: ListNetworks(networks.ListOpts{Name: spec.Loadbalancer.FloatingNetwork}) errors, returns zero networks (name typo/not found), or returns multiple networks with the same name.
Common situations: Floating network name misspelled in cluster spec; external network renamed after cluster creation; networks from other projects visible causing duplicate-name ambiguity; Neutron API outage/permission denial.
Related errors
- GetApiIngressStatus: Failed to list floating IP's: %v
- did not find floatingsubnet for external router
- Failed to list L3 floating ip: %v
- Could not find port floatingips port=%s
- failed to find floating ip: %v
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/1538c7c05dfc5095.
Report an issue: GitHub.