Enable authentication to access the kubernetes dashboard ui

3/10/2018

I'm using kubernetes on a local Mac OS docker installation.

I've installed the dashboard ui following these instructions:

kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml
kubectl proxy

When I try to access the ui by http://localhost:8001/ui I'll get a prompt to either provide a kubeconfig file or a token.

So I try to configure authentication: The dashboard docs refer to the authentication docs:

Basic authentication is enabled by passing the --basic-auth-file=SOMEFILE option to API server. ...

password,user,uid,"group1,group2,group3"

Questions:

  • Which command passes the option --basic-auth-file to kubernetes?
  • How do I have to specify the password file? Which groups are needed by the dashboard?
  • Is the authentication stored in the kubeconfig file, so that I can use that file for authentication?
-- Matthias M
kubernetes

0 Answers