diff --git a/cmd/kops/create_cluster.go b/cmd/kops/create_cluster.go index baa05fc752..3056b02297 100644 --- a/cmd/kops/create_cluster.go +++ b/cmd/kops/create_cluster.go @@ -1108,7 +1108,7 @@ func RunCreateCluster(ctx context.Context, f *util.Factory, out io.Writer, c *Cr } case api.TopologyPrivate: - if !supportsPrivateTopology(cluster.Spec.Networking) { + if cluster.Spec.Networking.Kubenet != nil { return fmt.Errorf("invalid networking option %s. Kubenet does not support private topology", c.Networking) } cluster.Spec.Topology = &api.TopologySpec{ @@ -1451,10 +1451,6 @@ func RunCreateCluster(ctx context.Context, f *util.Factory, out io.Writer, c *Cr return nil } -func supportsPrivateTopology(n *api.NetworkingSpec) bool { - return n.Kubenet == nil -} - func trimCommonPrefix(names []string) []string { // Trim shared prefix to keep the lengths sane // (this only applies to new clusters...)