I\'m pretty new in kubernetes, I just install kubernetes via kubeadm and run dashboard UI but can\'t config access to it. Following docs I add line --basic-auth-file=/
Your file for basic authentication /etc/kubernetes/auth.csv is not available inside kube-apiserver pod's container. It should be mounted to pod's container as well as certificate folders. Just add it to volumes and volumeMounts sections:
volumeMounts:
- mountPath: /etc/kubernetes/auth.csv
name: kubernetes-dashboard
readOnly: true
volumes:
- hostPath:
path: /etc/kubernetes/auth.csv
name: kubernetes-dashboard