diff --git a/cmd/minikube/cmd/service.go b/cmd/minikube/cmd/service.go index 227271cfe1f2..b0dfa558ec17 100644 --- a/cmd/minikube/cmd/service.go +++ b/cmd/minikube/cmd/service.go @@ -112,7 +112,10 @@ var serviceCmd = &cobra.Command{ services = newServices } - if len(services) == 0 { + if len(services) == 0 && all { + exit.Message(reason.SvcNotFound, `No services were found in the '{{.namespace}}' namespace. +You may select another namespace by using 'minikube service --all -n '`, out.V{"namespace": namespace}) + } else if len(services) == 0 { exit.Message(reason.SvcNotFound, `Service '{{.service}}' was not found in '{{.namespace}}' namespace. You may select another namespace by using 'minikube service {{.service}} -n '. Or list out all the services using 'minikube service list'`, out.V{"service": args[0], "namespace": namespace}) }