Point multi-node *-env users to the registry addon

pull/8485/head
Thomas Stromberg 2020-06-15 12:38:28 -07:00
parent 804e772efd
commit c2e71996a8
2 changed files with 8 additions and 0 deletions

View File

@ -141,6 +141,10 @@ var dockerEnvCmd = &cobra.Command{
exit.UsageT(`'none' driver does not support 'minikube docker-env' command`)
}
if len(co.Config.Nodes) > 1 {
exit.WithCodeT(exit.BadUsage, `The docker-env command is incompatible with multi-node clusters. Use the 'registry' add-on: https://minikube.sigs.k8s.io/docs/handbook/registry/`)
}
if co.Config.KubernetesConfig.ContainerRuntime != "docker" {
exit.WithCodeT(exit.BadUsage, `The docker-env command is only compatible with the "docker" runtime, but this cluster was configured to use the "{{.runtime}}" runtime.`,
out.V{"runtime": co.Config.KubernetesConfig.ContainerRuntime})

View File

@ -116,6 +116,10 @@ var podmanEnvCmd = &cobra.Command{
exit.UsageT(`'none' driver does not support 'minikube podman-env' command`)
}
if len(co.Config.Nodes) > 1 {
exit.WithCodeT(exit.BadUsage, `The podman-env command is incompatible with multi-node clusters. Use the 'registry' add-on: https://minikube.sigs.k8s.io/docs/handbook/registry/`)
}
if ok := isPodmanAvailable(co.CP.Runner); !ok {
exit.WithCodeT(exit.Unavailable, `The podman service within '{{.cluster}}' is not active`, out.V{"cluster": cname})
}