{"record":{"id":"fc9906dcf42484a3","repo":"kubernetes/kops","slug":"error-building-dns-provider-w","errorCode":null,"errorMessage":"error building DNS provider: %w","messagePattern":"error building DNS provider: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/scaleway/cloud.go","lineNumber":181,"sourceCode":"\t\tlbAPI:          lb.NewZonedAPI(scwClient),\n\t\tmarketplaceAPI: marketplace.NewAPI(scwClient),\n\t}, nil\n}\n\nfunc (s *scwCloudImplementation) ClusterName(tags []string) string {\n\tif tags != nil {\n\t\treturn ClusterNameFromTags(tags)\n\t}\n\tif clusterName, ok := s.tags[TagClusterName]; ok {\n\t\treturn clusterName\n\t}\n\treturn \"\"\n}\n\nfunc (s *scwCloudImplementation) DNS() (dnsprovider.Interface, error) {\n\tprovider, err := dnsprovider.GetDnsProvider(dns.ProviderName, nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error building DNS provider: %w\", err)\n\t}\n\treturn provider, nil\n}\n\nfunc (s *scwCloudImplementation) ProviderID() kops.CloudProviderID {\n\treturn kops.CloudProviderScaleway\n}\n\nfunc (s *scwCloudImplementation) Region() string {\n\treturn string(s.region)\n}\n\nfunc (s *scwCloudImplementation) Zone() string {\n\treturn string(s.zone)\n}\n\nfunc (s *scwCloudImplementation) DomainService() *domain.API {\n\treturn s.domainAPI","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/scaleway/cloud.go#L163-L199","documentation":"scwCloudImplementation.DNS calls dnsprovider.GetDnsProvider with the configured dns.ProviderName and nil config. This error means the kops dnsprovider registry could not build the requested DNS provider — typically because the provider name is not registered or its constructor requires configuration that was not supplied (nil here). It is kOps plumbing around DNS, not a Scaleway API call.","triggerScenarios":"dnsprovider.GetDnsProvider(\"scaleway\", nil) fails: the provider string is empty/unknown, no DNS provider factory was registered via init() in the built binary, or the provider's constructor returns an error because it cannot read required config (e.g. missing DNS_* env vars).","commonSituations":"Building kOps with build tags or package imports that exclude the Scaleway DNS provider; KOPS_DNS_PROVIDER unset or misspelled; running a stripped-down kops build that dropped the dnsprovider plugin.","solutions":["Check the wrapped error to see whether it is 'provider not found' vs a constructor error.","Ensure dns.ProviderName is a supported value (e.g. 'route53', 'google-clouddns', 'scaleway') and set via KOPS_DNS_PROVIDER correctly.","Verify the kops binary includes the provider: keep the dnsprovider import (blank-import registry) in the build.","If the provider needs env vars, export them (e.g. SCW_ACCESS_KEY/SCW_SECRET_KEY) even though config is passed as nil."],"exampleFix":"// before\nexport KOPS_DNS_PROVIDER=\"\"           # unknown provider\n// after\nexport KOPS_DNS_PROVIDER=\"scaleway\"","handlingStrategy":"try-catch","validationCode":"if dns.ProviderName == \"\" {\n  return fmt.Errorf(\"KOPS_DNS_PROVIDER is not set; set it to a registered provider\")\n}","typeGuard":null,"tryCatchPattern":"provider, err := s.DNS()\nif err != nil {\n  var notFound *dnsprovider.ProviderNotFoundError\n  if errors.As(err, &notFound) {\n    klog.Errorf(\"DNS provider %q not registered in this kops build; check KOPS_DNS_PROVIDER and build tags\", dns.ProviderName)\n  }\n  return fmt.Errorf(\"cluster update aborted, DNS unusable: %w\", err)\n}","preventionTips":["Always set KOPS_DNS_PROVIDER explicitly in CI and shell profiles.","Use an official kops release build that registers all DNS providers.","Smoke-test DNS provider construction early in provisioning pipelines."],"tags":["dns","scaleway","provider-registry","kops"],"backgroundTag":"dns-provider-not-found","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"}