The dashboard uses the 'kubernetes' service that is available inside the cluster to access the API. The default service account <http://kubernetes.io/docs/user-guide/service-accounts/> for pods mounts tokens to each container at /var/run/secrets/kubernetes.io/serviceaccount/ that allow the container to authenticate with the API.
Hope that helps. On Wed, Jun 1, 2016 at 10:39 AM Qian Zhang <[email protected]> wrote: > Hi, > > I have deployed Kubernetes dashboard in my Kubernetes cluster with the > following two yaml files: > > https://github.com/kubernetes/kubernetes/blob/master/cluster/addons/dashboard/dashboard-controller.yaml > > https://github.com/kubernetes/kubernetes/blob/master/cluster/addons/dashboard/dashboard-service.yaml > > The dashboard works well. I am just curious how the dashboard can know > where the apiserver is? I think the dashboard need to access apiserver to > query info and create objects, but in dashboard-controller.yaml, it seems > there is no any info about the IP/port of apiserver, so how can dashboard > connect to the apiserver? > > And in another hand, I can access the dashboard through apiserver > (http://<apiserver > IP>:<api server > port>/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard/), > can anyone let me know how it works? Actually I found in the host on which > apiserver is running, I can not access the dashboard via its service's > cluster IP since I do not have kube-proxy running on that host, so I am > curious why I can access dashboard through api server. > > > Thanks, > Qian > > -- > You received this message because you are subscribed to the Google Groups > "Containers at Google" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/google-containers. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Containers at Google" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-containers. For more options, visit https://groups.google.com/d/optout.
