{"record":{"id":"4ab9b51db2182e73","repo":"kubernetes/kops","slug":"unknown-networking-mode-q","errorCode":null,"errorMessage":"unknown networking mode %q","messagePattern":"unknown networking mode %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/new_cluster.go","lineNumber":1362,"sourceCode":"\t\t}\n\t\tenabled := false\n\t\tcluster.Spec.KubeProxy.Enabled = &enabled\n\tcase \"amazonvpc\", \"amazon-vpc-routed-eni\":\n\t\tcluster.Spec.Networking.AmazonVPC = &api.AmazonVPCNetworkingSpec{}\n\tcase \"cilium\", \"\":\n\t\taddCiliumNetwork(cluster)\n\tcase \"cilium-etcd\":\n\t\taddCiliumNetwork(cluster)\n\t\tcluster.Spec.Networking.Cilium.EtcdManaged = true\n\tcase \"cilium-eni\":\n\t\taddCiliumNetwork(cluster)\n\t\tcluster.Spec.Networking.Cilium.IPAM = \"eni\"\n\tcase \"gcp\", \"gce\":\n\t\tcluster.Spec.Networking.GCP = &api.GCPNetworkingSpec{}\n\tcase \"kindnet\":\n\t\tcluster.Spec.Networking.Kindnet = &api.KindnetNetworkingSpec{}\n\tdefault:\n\t\treturn fmt.Errorf(\"unknown networking mode %q\", opt.Networking)\n\t}\n\n\tklog.V(4).Infof(\"networking mode=%s => %s\", opt.Networking, fi.DebugAsJsonString(cluster.Spec.Networking))\n\n\treturn nil\n}\n\nfunc setupTopology(opt *NewClusterOptions, cluster *api.Cluster, allZones sets.String) ([]*api.InstanceGroup, error) {\n\tvar bastions []*api.InstanceGroup\n\n\tif opt.Topology == \"\" {\n\t\tif opt.IPv6 {\n\t\t\topt.Topology = api.TopologyPrivate\n\t\t} else {\n\t\t\topt.Topology = api.TopologyPublic\n\t\t}\n\t}\n","sourceCodeStart":1344,"sourceCodeEnd":1380,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/new_cluster.go#L1344-L1380","documentation":"setupNetworking translates the --networking flag into the cluster spec's networking section. Any value not in the supported set (e.g. cilium, calico, canal, kube-router, gcp/gce, kindnet, etc.) falls to the default branch and aborts cluster creation with this error naming the offending value.","triggerScenarios":"`kops create cluster --networking <unsupported-value>` — e.g. a typo like `--networking ciluim`, an old option removed from newer kops (flannel/weave/romana in recent versions), or a misspelled choice passed by a script.","commonSituations":"Upgrading kops and reusing old scripts whose --networking value is no longer supported (e.g. --networking weave); typos; copying flags from a different tool (e.g. kubeadm's CNI names); shell variable defaulting to an empty/odd value.","solutions":["Run `kops create cluster --help` and pick a supported --networking value (e.g. cilium, calico, canal, kindnet).","Fix typos in the flag value.","If using a removed CNI, migrate to a supported one (e.g. --networking cilium) or pin the older kops version that still supports it."],"exampleFix":"// before\nkops create cluster my.cluster --networking ciluim\n// after\nkops create cluster my.cluster --networking cilium","handlingStrategy":"validation","validationCode":"kops create cluster --help 2>&1 | grep -A20 networking  # verify --networking value against the supported list","typeGuard":null,"tryCatchPattern":"if err := createCluster(); err != nil && strings.Contains(err.Error(), \"unknown networking mode\") { /* correct the --networking value and retry */ }","preventionTips":["Copy flag values only from the kops help of the installed version","Re-check scripts after kops upgrades (CNIs get removed)","Add a whitelist check in wrapper scripts"],"tags":["networking","cli-flags","cluster-creation"],"backgroundTag":"invalid-flag-value","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"}