Skip to content

Commit

Permalink
Merge pull request #6998 from tstromberg/kubectl-mismatch
Browse files Browse the repository at this point in the history
Improve kubectl mismatch UI for clarity
  • Loading branch information
tstromberg authored Mar 11, 2020
2 parents a5f8ad0 + aaf115b commit 2412dd5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,11 @@ func showKubectlInfo(kcs *kubeconfig.Settings, k8sVersion string, machineName st
glog.Infof("kubectl: %s, cluster: %s (minor skew: %d)", client, cluster, minorSkew)

if client.Major != cluster.Major || minorSkew > 1 {
out.WarningT("{{.path}} is version {{.client_version}}, and is incompatible with Kubernetes {{.cluster_version}}. You will need to update {{.path}} or use 'minikube kubectl' to connect with this cluster",
out.Ln("")
out.T(out.Warning, "{{.path}} is v{{.client_version}}, which may be incompatible with Kubernetes v{{.cluster_version}}.",
out.V{"path": path, "client_version": client, "cluster_version": cluster})
out.T(out.Tip, "You can also use 'minikube kubectl -- get pods' to invoke a matching version",
out.V{"path": path, "client_version": client})
}
return nil
}
Expand Down

0 comments on commit 2412dd5

Please sign in to comment.