diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index cd7b59f3f65f..b1b964756efc 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -1581,7 +1581,7 @@ func validateInsecureRegistry() { } } -func createNode(cc config.ClusterConfig, kubeNodeName string, existing *config.ClusterConfig) (config.ClusterConfig, config.Node, error) { +func createNode(cc config.ClusterConfig, existing *config.ClusterConfig) (config.ClusterConfig, config.Node, error) { // Create the initial node, which will necessarily be a control plane if existing != nil { cp, err := config.PrimaryControlPlane(existing) @@ -1608,7 +1608,6 @@ func createNode(cc config.ClusterConfig, kubeNodeName string, existing *config.C Port: cc.KubernetesConfig.NodePort, KubernetesVersion: getKubernetesVersion(&cc), ContainerRuntime: getContainerRuntime(&cc), - Name: kubeNodeName, ControlPlane: true, Worker: true, } diff --git a/cmd/minikube/cmd/start_flags.go b/cmd/minikube/cmd/start_flags.go index 12e22c982f24..4e6a3359be96 100644 --- a/cmd/minikube/cmd/start_flags.go +++ b/cmd/minikube/cmd/start_flags.go @@ -329,11 +329,7 @@ func generateClusterConfig(cmd *cobra.Command, existing *config.ClusterConfig, k proxy.SetDockerEnv() } - var kubeNodeName string - if driver.BareMetal(cc.Driver) { - kubeNodeName = "m01" - } - return createNode(cc, kubeNodeName, existing) + return createNode(cc, existing) } func getCPUCount(drvName string) int { diff --git a/pkg/minikube/node/node.go b/pkg/minikube/node/node.go index 1e854543dca9..273a59a2ad1e 100644 --- a/pkg/minikube/node/node.go +++ b/pkg/minikube/node/node.go @@ -28,7 +28,6 @@ import ( "k8s.io/klog/v2" "k8s.io/minikube/pkg/kapi" "k8s.io/minikube/pkg/minikube/config" - "k8s.io/minikube/pkg/minikube/driver" "k8s.io/minikube/pkg/minikube/machine" ) @@ -156,10 +155,6 @@ func Delete(cc config.ClusterConfig, name string) (*config.Node, error) { // Retrieve finds the node by name in the given cluster func Retrieve(cc config.ClusterConfig, name string) (*config.Node, int, error) { - if driver.BareMetal(cc.Driver) { - name = "m01" - } - for i, n := range cc.Nodes { if n.Name == name { return &n, i, nil