How to configure Basic Authentication Configuration in Kubernetes Dashboard

6/4/2019

How to configure Basic Authentication Configuration In kubernetes Dashbaord .I have done below steps

  1. --authentication-mode=basic added in kubernetes dashboard deployment yaml.

  2. Done API server to be configured (inside /etc/kubernetes/manifests/kube-apiserver.yaml" with authorization mode ABAC and --basic-auth-file given to a file and that file contain like "userpass,username,uid"

But still unable to get the result . Whatever I wrote (even random letter) in the username and password field it able to login into the dashboard and no resources access after that.

-- Way Fun
kubernetes
kubernetes-dashboard
kubernetes-ingress

1 Answer

6/4/2019

one way to achieve is by fronting the dashboard service with a traefik ingress controller. set basic auth in traefik deployment file. create ingress rule for dashboard service

you can also use nginx ingress controller. below link would be helpful

https://github.com/kubernetes-retired/contrib/tree/master/ingress/controllers/nginx/examples/auth

-- P Ekambaram
Source: StackOverflow