Minikube: Improve error message for service not in default namespace.

Created on 5 Sep 2019  ·  6Comments  ·  Source: kubernetes/minikube

1- create a NodePort service in not default namespace:

$ kubectlget svc -A
NAMESPACE     NAME                    TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                  AGE
default       kubernetes              ClusterIP   10.96.0.1        <none>        443/TCP                  15d
dgeek-v1      dgeek-helm-dgeek-helm   NodePort    10.103.186.237   <none>        80:32316/TCP             3m40s

2- try to open the service url:

$ minikube service dgeek-helm-dgeek-helm

💣  Error opening service
❌  Error: [SERVICE_NOT_FOUND] Could not find finalized endpoint being pointed to by dgeek-helm-dgeek-helm: Temporary Error: Error getting service dgeek-helm-dgeek-helm: services "dgeek-helm-dgeek-helm" not found
Temporary Error: Error getting service dgeek-helm-dgeek-helm: services "dgeek-helm-dgeek-helm" not found
Temporary Error: Error getting service dgeek-helm-dgeek-helm: services "dgeek-helm-dgeek-helm" not found
Temporary Error: Error getting service dgeek-helm-dgeek-helm: services "dgeek-helm-dgeek-helm" not found
💡  Suggestion: Please make sure the service you are looking for is deployed or is in the correct namespace.
⁉️   Related issues:
    ▪ https://github.com/kubernetes/minikube/issues/4599

😿  If the above advice does not help, please let us know: 
👉  https://github.com/kubernetes/minikube/issues/new/choose

the error message is big and suggestion gets over-shaddowed.

I suggest the error message say

service X was not found in default namespace , please try with "minikube service X -n Y"

good first issue kinbug prioritbacklog

Most helpful comment

Hey! I would like to take this up!

All 6 comments

Hey! I would like to take this up!

@rbrishabh awesome! Let us know if you have any questions. :)

@rbrishabh are you still working on this?

Yes! Will submit a PR today! @RA489

@medyagh can this issue be assigned to me. I've created PR to fix https://github.com/kubernetes/minikube/pull/5563

/assign

Was this page helpful?
0 / 5 - 0 ratings