kubernetes/kops · error

error building (Designate) DNS provider: %v

Error message

error building (Designate) DNS provider: %v

What it means

Returned by openstackCloud.DNS() when dnsprovider.GetDnsProvider for the Designate provider fails to instantiate the DNS provider interface. It indicates the Designate dnsprovider plugin could not initialize, usually because the underlying OpenStack DNS client/auth could not be built.

Source

Thrown at upup/pkg/fi/cloudup/openstack/cloud.go:562

	return c.dnsClient
}

func (c *openstackCloud) ImageClient() *gophercloud.ServiceClient {
	return c.glanceClient
}

func (c *openstackCloud) Region() string {
	return c.region
}

func (c *openstackCloud) ProviderID() kops.CloudProviderID {
	return kops.CloudProviderOpenstack
}

func (c *openstackCloud) DNS() (dnsprovider.Interface, error) {
	provider, err := dnsprovider.GetDnsProvider(designate.ProviderName, nil)
	if err != nil {
		return nil, fmt.Errorf("error building (Designate) DNS provider: %v", err)
	}
	return provider, nil
}

// FindVPCInfo list subnets in network
func (c *openstackCloud) FindVPCInfo(id string) (*fi.VPCInfo, error) {
	return findVPCInfo(c, id, c.zones)
}

func findVPCInfo(c OpenstackCloud, id string, zones []string) (*fi.VPCInfo, error) {
	vpcInfo := &fi.VPCInfo{}
	// Find subnets in the network
	{
		if len(zones) == 0 {
			return nil, fmt.Errorf("could not initialize zones")
		}
		klog.V(2).Infof("Calling ListSubnets for subnets in Network %q", id)
		opt := subnets.ListOpts{

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Export valid OpenStack credentials (OS_AUTH_URL, OS_USERNAME, OS_PASSWORD, OS_PROJECT_NAME, OS_REGION_NAME) and verify 'openstack zone list' works
  2. Confirm Designate is deployed and reachable
  3. Rebuild with the designate dnsprovider plugin registered (check imports of dnsprovider/plugins/openstack/designate)
  4. Check the underlying %v message for the specific provider init failure

Example fix

// before: running without credentials
$ kops update cluster ... // no OS_* env
// after
$ source openstack-rc.sh && kops update cluster ...
Defensive patterns

Strategy: validation

Validate before calling

// ensure credentials and designate availability before calling DNS()
if os.Getenv("OS_AUTH_URL") == "" { return errors.New("OpenStack credentials not configured") }
// optionally: openstack zone list must succeed

Try / catch

// go
provider, err := cloud.DNS()
if err != nil {
    return fmt.Errorf("DNS unavailable; check designate and OS_* credentials: %w", err)
}

Prevention

When it happens

Trigger: DNS() is called (e.g. during cluster DNS operations) and designate.ProviderName cannot be resolved to a working provider — nil config with no ambient OpenStack credentials, or the Designate client creation inside the provider errors.

Common situations: Running kops where OS_* credentials are missing/expired so Designate auth fails; Designate not deployed; dnsprovider registry not including designate (build issue); project lacks access to the dns service.

Related errors


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/215c7543e67595b0. Report an issue: GitHub.