<p>How to configure Basic Authentication Configuration In kubernetes Dashbaord .I have done below steps</p>

<ol>
<li><p><strong>--authentication-mode=basic</strong> added in kubernetes dashboard deployment yaml.</p></li>
<li><p>Done API server  to be configured (inside /etc/kubernetes/manifests/kube-apiserver.yaml" with authorization mode <strong>ABAC</strong> and <strong>--basic-auth-file</strong> given to a file and that file contain like "<strong>userpass,username,uid</strong>"</p></li>
</ol>

<p>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.</p>

Way Fun
<p>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</p>

<p>you can also use nginx ingress controller.
below link would be helpful</p>

<p><a href="https://github.com/kubernetes-retired/contrib/tree/master/ingress/controllers/nginx/examples/auth" rel="nofollow noreferrer">https://github.com/kubernetes-retired/contrib/tree/master/ingress/controllers/nginx/examples/auth</a></p>
