kubernetes/kops · error
error building neutron client: %w
Error message
error building neutron client: %w
What it means
buildClients (upup/pkg/fi/cloudup/openstack/cloud.go:394) builds the Neutron networking v2 client with openstack.NewNetworkV2 and EndpointOpts{Type: "network", Region: region}. It fails when the authenticated service catalog contains no network endpoint matching that type and region. Wrapped with %w, the root cause (typically gophercloud ErrEndpointNotFound) is preserved.
Source
Thrown at upup/pkg/fi/cloudup/openstack/cloud.go:394
// used when no cluster is available
return buildClients(provider, nil, nil, config, region, false)
}
func buildClients(provider *gophercloud.ProviderClient, tags map[string]string, spec *kops.OpenstackSpec, config vfs.OpenstackConfig, region string, hasDNS bool) (OpenstackCloud, error) {
cinderClient, err := openstack.NewBlockStorageV3(provider, gophercloud.EndpointOpts{
Type: "volumev3",
Region: region,
})
if err != nil {
return nil, fmt.Errorf("error building cinder client: %w", err)
}
neutronClient, err := openstack.NewNetworkV2(provider, gophercloud.EndpointOpts{
Type: "network",
Region: region,
})
if err != nil {
return nil, fmt.Errorf("error building neutron client: %w", err)
}
novaClient, err := openstack.NewComputeV2(provider, gophercloud.EndpointOpts{
Type: "compute",
Region: region,
})
if err != nil {
return nil, fmt.Errorf("error building nova client: %w", err)
}
// 2.47 is the minimum version where the compute API /server/details returns flavor names
novaClient.Microversion = "2.47"
glanceClient, err := openstack.NewImageV2(provider, gophercloud.EndpointOpts{
Type: "image",
Region: region,
})
if err != nil {
return nil, fmt.Errorf("error building glance client: %w", err)View on GitHub (pinned to 4c8573c808)
Solutions
- Run `openstack endpoint list --service network --region <region>` to confirm the endpoint exists
- Correct OS_REGION_NAME to a region where Neutron is deployed
- Deploy/register the Neutron service in the region if missing
- Check endpoint interface visibility (public vs internal) matches the client's endpoint type preference
Defensive patterns
Strategy: validation
Validate before calling
endpoints, err := catalogEndpoints(token, "network")
if err != nil || len(endpoints) == 0 {
return fmt.Errorf("no network endpoint for region %q", region)
}
return nil Prevention
- Confirm Neutron is deployed in the target region before kops
- Verify `openstack endpoint list --service network --region <region>`
- Use exact region names from `openstack region list`
- Ensure the project's catalog is not restricted from the network service
When it happens
Trigger: No 'network' service entry in the catalog for the region; Networking (Neutron) not deployed in that region; region mismatch between OS_REGION_NAME and the endpoint's region attribute; catalog corrupted or the endpoint's type renamed.
Common situations: Minimal OpenStach installs without Neutron (compute-only); multi-region clouds where only some regions run Neutron; case/typo issues in the region option; a proxy exposing only some services.
Related errors
- error building cinder client: %w
- error building nova client: %w
- error building glance client: %w
- error describing Network: %v
- network %q not found
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/3f312fc09ce21f8c.
Report an issue: GitHub.