{"record":{"id":"0cb197d3028878d2","repo":"kubernetes/kops","slug":"kops-ipam-controller-is-not-supported-on-cloud-q","errorCode":null,"errorMessage":"kOps IPAM controller is not supported on cloud %q","messagePattern":"kOps IPAM controller is not supported on cloud %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/kops-controller/main.go","lineNumber":422,"sourceCode":"\t\tipamController, err := controllers.NewAWSIPAMReconciler(ctx, mgr)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"creating aws IPAM controller: %w\", err)\n\t\t}\n\t\tcontroller = ipamController\n\tcase \"gce\":\n\t\tipamController, err := controllers.NewGCEIPAMReconciler(mgr)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"creating gce IPAM controller: %w\", err)\n\t\t}\n\t\tcontroller = ipamController\n\tcase \"metal\":\n\t\tipamController, err := controllers.NewMetalIPAMReconciler(ctx, mgr)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"creating metal IPAM controller: %w\", err)\n\t\t}\n\t\tcontroller = ipamController\n\tdefault:\n\t\treturn fmt.Errorf(\"kOps IPAM controller is not supported on cloud %q\", opt.Cloud)\n\t}\n\n\tif err := controller.SetupWithManager(mgr); err != nil {\n\t\treturn fmt.Errorf(\"registering IPAM controller: %w\", err)\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":404,"sourceCodeEnd":431,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/cmd/kops-controller/main.go#L404-L431","documentation":"setupCloudIPAM only supports the IPAM controller on aws, gce, and metal clouds. When opt.Cloud holds any other value (e.g. openstack, azure, do, hetzner, or a typo), the switch hits the default branch and this error aborts startup. It is a deliberate unsupported-platform guard, not a transient failure.","triggerScenarios":"kops-controller started with the IPAM controller enabled and --cloud set to a value other than aws, gce, or metal (including misspellings like 'AWS').","commonSituations":"Running kops-controller on openstack/azure/hetzner where kOps IPAM is not implemented; copy-pasted launch config carrying the IPAM flag across clouds; case mismatch ('AWS' vs 'aws').","solutions":["Remove/disable the kOps IPAM controller flag for this cloud (use the cloud's native IPAM instead)","Correct --cloud to one of aws, gce, metal if the value was wrong or misspelled","If IPAM support is genuinely needed on this cloud, pin to a kops version or patch that implements it","Verify the controller startup config (feature flags/config) for leftover IPAM settings"],"exampleFix":"// before\nextraArgs:\n  enable-ipam-controller: \"true\"   # on openstack\n// after\nextraArgs: {}   # IPAM controller only supported on aws/gce/metal","handlingStrategy":"validation","validationCode":"// check support before enabling\nvar ipamSupported = map[string]bool{\"aws\": true, \"gce\": true, \"metal\": true}\nif !ipamSupported[opt.Cloud] {\n\t// skip enabling the IPAM controller for this cloud\n}","typeGuard":"func ipamSupported(cloud string) bool {\n\tswitch cloud {\n\tcase \"aws\", \"gce\", \"metal\":\n\t\treturn true\n\t}\n\treturn false\n}","tryCatchPattern":"if err := setupCloudIPAM(ctx, controllers, mgr, opt); err != nil {\n\tif strings.Contains(err.Error(), \"not supported on cloud\") {\n\t\tsetupLog.Info(\"IPAM not supported on this cloud; skipping\")\n\t\treturn\n\t}\n\tsetupLog.Error(err, \"IPAM controller setup failed\")\n\tos.Exit(1)\n}","preventionTips":["Only set the IPAM controller flag on aws/gce/metal deployments","Audit launch templates/config for copied flags across environments","Use exact lowercase cloud names ('aws', not 'AWS')"],"tags":["ipam","unsupported-cloud","configuration","startup"],"backgroundTag":"unsupported-cloud-provider","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}