{"record":{"id":"a2162e4b9cb9acda","repo":"kubernetes/kops","slug":"dns-not-implemented-on-azurecloud","errorCode":null,"errorMessage":"DNS not implemented on azureCloud","messagePattern":"DNS not implemented on azureCloud","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/azure/azure_cloud.go","lineNumber":186,"sourceCode":"\tif azureCloudImpl.storageAccountsClient, err = newStorageAccountsClientImpl(subscriptionID, cred); err != nil {\n\t\treturn nil, err\n\t}\n\n\tCacheAzureCloudInstance(subscriptionID, resourceGroupName, azureCloudImpl)\n\n\treturn azureCloudImpl, nil\n}\n\nfunc (c *azureCloudImplementation) Region() string {\n\treturn c.location\n}\n\nfunc (c *azureCloudImplementation) ProviderID() kops.CloudProviderID {\n\treturn kops.CloudProviderAzure\n}\n\nfunc (c *azureCloudImplementation) DNS() (dnsprovider.Interface, error) {\n\treturn nil, errors.New(\"DNS not implemented on azureCloud\")\n}\n\nfunc (c *azureCloudImplementation) FindVPCInfo(id string) (*fi.VPCInfo, error) {\n\treturn nil, errors.New(\"FindVPCInfo not implemented on azureCloud, use FindVNetInfo instead\")\n}\n\nfunc (c *azureCloudImplementation) FindVNetInfo(id, resourceGroup string) (*fi.VPCInfo, error) {\n\tvnets, err := c.vnetsClient.List(context.TODO(), resourceGroup)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, vnet := range vnets {\n\t\tif *vnet.ID != id {\n\t\t\tcontinue\n\t\t}\n\t\tif vnet.Properties == nil {\n\t\t\tcontinue\n\t\t}","sourceCodeStart":168,"sourceCodeEnd":204,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/azure/azure_cloud.go#L168-L204","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Use an externally managed DNS zone and configure kubernetesApiAccess/dns to point at it instead of expecting kops to manage Azure DNS","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","Use gossip-based (mesh) DNS by setting the cluster topology to not require a DNS provider"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if c.ProviderID() == kops.CloudProviderAzure {\n\treturn fmt.Errorf(\"kops-managed DNS is not available on Azure; configure external DNS\")\n}","typeGuard":"if _, ok := cloud.(interface{ DNS() (dnsprovider.Interface, error) }); ok { ... } // will still error at runtime on Azure; gate on ProviderID instead","tryCatchPattern":"dns, err := cloud.DNS()\nif err != nil {\n\tif strings.Contains(err.Error(), \"DNS not implemented on azureCloud\") {\n\t\t// use external/Azure-managed DNS path\n\t} else { return err }\n}","preventionTips":["Check the cloud provider before calling generic cloud interfaces","Use gossip or pre-provisioned DNS for Azure clusters","Consult kops Azure support docs for which fi.Cloud methods are implemented"],"tags":["azure","dns","not-implemented","cloud-provider"],"backgroundTag":"not-implemented-on-provider","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}