{"record":{"id":"8cabfd27cc49d436","repo":"kubernetes/kops","slug":"unknown-dns-provider-q","errorCode":null,"errorMessage":"unknown DNS provider %q","messagePattern":"unknown DNS provider %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"dnsprovider/pkg/dnsprovider/plugins.go","lineNumber":105,"sourceCode":"\t\tvar config *os.File\n\t\tconfig, err = os.Open(configFilePath)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"couldn't open DNS provider configuration %s: %#v\", configFilePath, err)\n\t\t}\n\n\t\tdefer config.Close()\n\t\tdns, err = GetDnsProvider(name, config)\n\t} else {\n\t\t// Pass explicit nil so plugins can actually check for nil. See\n\t\t// \"Why is my nil error value not equal to nil?\" in golang.org/doc/faq.\n\t\tdns, err = GetDnsProvider(name, nil)\n\t}\n\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"could not init DNS provider %q: %v\", name, err)\n\t}\n\tif dns == nil {\n\t\treturn nil, fmt.Errorf(\"unknown DNS provider %q\", name)\n\t}\n\n\treturn dns, nil\n}\n","sourceCodeStart":87,"sourceCodeEnd":110,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/dnsprovider/pkg/dnsprovider/plugins.go#L87-L110","documentation":"InitDnsProvider looks up a registered DNS provider plugin by name; if the name is registered but its factory returns nil without error, or more typically the name is not in the plugin registry, dns comes back nil and this error is thrown. It means the requested DNS provider (e.g. from --dns=... or KOPS_DNS_FLAG) is not compiled in or not registered.","triggerScenarios":"Calling InitDnsProvider(name, ...) with a provider name that has no registered factory in dnsprovider/pkg/dnsprovider/plugins.go, so the lookup returns nil.","commonSituations":"Typo in the provider name (aws-route53 vs aws); building a trimmed binary that excludes a provider plugin; using a provider removed in a newer kOps version (e.g. vsphere/google); custom builds without the plugin import.","solutions":["Check the exact provider name spelling against the registered names in dnsprovider/pkg/dnsprovider/plugins.go (e.g. 'aws-route53').","Use a standard kOps release build that includes the DNS provider plugin you need.","If building from source, ensure the provider package is imported so its init() registers the factory."],"exampleFix":"// before\nclient, err := dnsprovider.InitDnsProvider(\"route53\", \"\")\n// after\nclient, err := dnsprovider.InitDnsProvider(\"aws-route53\", \"\")","handlingStrategy":"validation","validationCode":"// verify the provider is registered before use\nproviders := dnsprovider.GetDnsProviders()\nif _, ok := providers[\"aws-route53\"]; !ok {\n    return fmt.Errorf(\"DNS provider %q not available in this build\", providerName)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use the exact registered provider name constants (e.g. 'aws-route53').","Prefer standard release binaries which register all supported providers.","When building from source, verify the provider package is imported by the binary."],"tags":["dns","configuration","plugin-registry"],"backgroundTag":"unknown-provider-name","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"}