services “kubernetes-dashboard” , can't access kubernetes ui

7/29/2021

I am deploy kubernetes UI using this command:<br> kubectl apply -f kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.2.0/aio/deploy/recommended.yaml And it response "Unable to connect to the server: dial tcp 185.199.110.133:443: i/o timeout" <br>I behind proxy, how can i fix it?

-- truboise
dashboard
kubernetes

1 Answer

7/29/2021

All the services that you deployed via the supplied url don't have a kind specified. This means they will be using the default service type which is ClusterIP.

Services of Kind ClusterIP are only accessible from inside your Kubernetes Cluster.

If you want the Dashboard to be accessible from outside your Cluster, you will need a service of type NodePort. A NodePort Service will assign a random high number port on all your nodes on which your application, in this case the k8s dashboard, will be accessible via ${ip-of-any-node}:${assigned-nodeport}.

For more information, please take a look at the official k8s documentation.

If your cluster is behind a proxy, also make sure, that you can reach your clusters node's external ip from wherever you are trying to send the request from.

In order to find out what port number has been assigned to your NodePort service use kubectl describe service ${servicename} or kubectl get service ${servicename} -o yaml

-- meaningqo
Source: StackOverflow