kubernetes/kops · error

DNS not implemented on azureCloud

Error message

DNS not implemented on azureCloud

What it means

kops' azure cloud implementation does not implement the fi.Cloud DNS() method, so any code path requesting a dnsprovider.Interface for Azure gets this hard error. Azure cluster DNS (Azure DNS private zones) is handled by a different mechanism than the generic dnsprovider abstraction.

Source

Thrown at upup/pkg/fi/cloudup/azure/azure_cloud.go:186

	if azureCloudImpl.storageAccountsClient, err = newStorageAccountsClientImpl(subscriptionID, cred); err != nil {
		return nil, err
	}

	CacheAzureCloudInstance(subscriptionID, resourceGroupName, azureCloudImpl)

	return azureCloudImpl, nil
}

func (c *azureCloudImplementation) Region() string {
	return c.location
}

func (c *azureCloudImplementation) ProviderID() kops.CloudProviderID {
	return kops.CloudProviderAzure
}

func (c *azureCloudImplementation) DNS() (dnsprovider.Interface, error) {
	return nil, errors.New("DNS not implemented on azureCloud")
}

func (c *azureCloudImplementation) FindVPCInfo(id string) (*fi.VPCInfo, error) {
	return nil, errors.New("FindVPCInfo not implemented on azureCloud, use FindVNetInfo instead")
}

func (c *azureCloudImplementation) FindVNetInfo(id, resourceGroup string) (*fi.VPCInfo, error) {
	vnets, err := c.vnetsClient.List(context.TODO(), resourceGroup)
	if err != nil {
		return nil, err
	}
	for _, vnet := range vnets {
		if *vnet.ID != id {
			continue
		}
		if vnet.Properties == nil {
			continue
		}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Use an externally managed DNS zone and configure kubernetesApiAccess/dns to point at it instead of expecting kops to manage Azure DNS
  2. If Azure DNS support is needed, implement DNS() in azureCloudImplementation using the Azure DNS SDK, or upgrade kops to a version where Azure DNS support exists
  3. Use gossip-based (mesh) DNS by setting the cluster topology to not require a DNS provider
Defensive patterns

Strategy: validation

Validate before calling

if c.ProviderID() == kops.CloudProviderAzure {
	return fmt.Errorf("kops-managed DNS is not available on Azure; configure external DNS")
}

Type guard

if _, ok := cloud.(interface{ DNS() (dnsprovider.Interface, error) }); ok { ... } // will still error at runtime on Azure; gate on ProviderID instead

Try / catch

dns, err := cloud.DNS()
if err != nil {
	if strings.Contains(err.Error(), "DNS not implemented on azureCloud") {
		// use external/Azure-managed DNS path
	} else { return err }
}

Prevention

When it happens

Trigger: Any code path calling cloud.DNS() on an Azure cluster, e.g. during cluster creation when validating/configuring the public DNS zone, or DNS-related controller/bootstrap flows that resolve the cloud and ask for its DNS provider.

Common situations: Attempting kops set/update of the DNS configuration on an Azure cluster; building a cluster spec that relies on kops-managed DNS zones rather than pre-provisioned Azure DNS or external DNS; features shared across providers that assume DNS() is available.

Related errors


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