dashboard icon indicating copy to clipboard operation
dashboard copied to clipboard

Error from server (NotFound): services "kubernetes-dashboard-nginx-controller" not found

Open mathias1xxX opened this issue 2 years ago • 9 comments

What happened?

I installed Kubernetes on Ubuntu 22.04, added 2 workers, i can deploy everything and all works, but after install of the Dashboard and using this command: kubectl -n kubernetes-dashboard port-forward svc/kubernetes-dashboard-nginx-controller 8443:443

It says: Error from server (NotFound): services "kubernetes-dashboard-nginx-controller" not found

What did you expect to happen?

For it to work and forward.

How can we reproduce it (as minimally and precisely as possible)?

I followed this on a clean install: https://github.com/kubernetes/dashboard/releases

after following these install instructions: https://devopscube.com/setup-kubernetes-cluster-kubeadm/

Anything else we need to know?

Master node is on a ESXI Server

What browsers are you seeing the problem on?

Chrome, Microsoft Edge, Firefox

Kubernetes Dashboard version

V3

Kubernetes version

1.28.2

Dev environment

No response

mathias1xxX avatar Dec 08 '23 14:12 mathias1xxX

I meet the same problem.

herkoy avatar Dec 12 '23 13:12 herkoy

Not enough details about the installation. We need to know the exact steps and commands you used. Additionally, it would be good to get output of kubectl -n kubernetes-dashboard get svc and kubectl -n kubernetes-dashboard get all commands.

floreks avatar Dec 27 '23 12:12 floreks

Ok, I got it working after: kubectl -n kubernetes-dashboard port-forward svc/kubernetes-dashboard 8443:443 changing the name of the service: from kubernetes-dashboard-nginx-controller to kubernetes-dashboard. This should be fixed in the documentation.

yadirhb avatar Dec 27 '23 21:12 yadirhb

Documentation is actually correct. I have rechecked it and service name was correct. There must be something different in your environment that impacts service name.

floreks avatar Dec 28 '23 18:12 floreks

I meet the same problem. 哈哈哈

zhang-xiaoxiang avatar Feb 05 '24 04:02 zhang-xiaoxiang

Ok, I got it working after: kubectl -n kubernetes-dashboard port-forward svc/kubernetes-dashboard 8443:443 changing the name of the service: from kubernetes-dashboard-nginx-controller to kubernetes-dashboard. This should be fixed in the documentation.

same here, installed it on AKS

DreamCatcher13 avatar Feb 08 '24 08:02 DreamCatcher13

Documentation is actually correct. I have rechecked it and service name was correct. There must be something different in your environment that impacts service name.

I just ran into the same problem and the kubernetes-dashboard service name was also what I needed to use; kubernetes-dashboard-nginx-controller from this page https://github.com/kubernetes/dashboard/blob/master/docs/user/accessing-dashboard/README.md#kubectl-port-forward did not work. Perhaps the discrepancy is because I installed from Helm?

baaaaaaaaaaaaaaaaaa avatar Feb 12 '24 02:02 baaaaaaaaaaaaaaaaaa

Starting from the next release access step will slightly change making this issue invalid. It is already changed on master.

/close

floreks avatar Mar 04 '24 14:03 floreks

@floreks: Closing this issue.

In response to this:

Starting from the next release access step will slightly change making this issue invalid. It is already changed on master.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Mar 04 '24 14:03 k8s-ci-robot