{"record":{"id":"9ff348e9a54f923e","repo":"kubernetes/kops","slug":"egress-mode-q-is-not-supported","errorCode":null,"errorMessage":"egress mode %q is not supported","messagePattern":"egress mode %q is not supported","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/model/gcemodel/network.go","lineNumber":135,"sourceCode":"\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\t// If we're in an existing subnet, we assume egress is already configured.\n\t\t\tif subnet.ID != \"\" {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tswitch subnet.Egress {\n\t\t\tcase kops.EgressExternal:\n\t\t\t\t// User has request we ignore this\n\t\t\t\tcontinue\n\n\t\t\tcase kops.EgressNatGateway, \"\":\n\t\t\t\t// OK, should create\n\t\t\t\tsubnetworks = append(subnetworks, b.LinkToSubnet(subnet))\n\n\t\t\tdefault:\n\t\t\t\treturn fmt.Errorf(\"egress mode %q is not supported\", subnet.Egress)\n\t\t\t}\n\t\t}\n\n\t\tif len(subnetworks) != 0 {\n\n\t\t\tnetwork, err := b.LinkToNetwork()\n\t\t\tif err != nil {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\tr := &gcetasks.Router{\n\t\t\t\tName:                          s(b.NameForRouter(\"nat\")),\n\t\t\t\tLifecycle:                     b.Lifecycle,\n\t\t\t\tNetwork:                       network,\n\t\t\t\tRegion:                        s(b.Region),\n\t\t\t\tNATIPAllocationOption:         s(gcetasks.NATIPAllocationOptionAutoOnly),\n\t\t\t\tSourceSubnetworkIPRangesToNAT: s(gcetasks.SourceSubnetworkIPRangesSpecificSubnets),\n\t\t\t\tSubnetworks:                   subnetworks,\n\t\t\t}","sourceCodeStart":117,"sourceCodeEnd":153,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/model/gcemodel/network.go#L117-L153","documentation":"A subnet's egress configuration is neither NatGateway nor External (empty defaults to NatGateway) when building the GCE router/NAT; an unsupported egress value in the cluster spec reached the switch default.","triggerScenarios":"Thrown at pkg/model/gcemodel/network.go:135 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the subnet's egress to NatGateway or External","Clear the egress field to accept the default","Fix via kops edit cluster and re-run update"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}