P
P
para_noir_in_my_box2021-11-24 13:33:19
User identification
para_noir_in_my_box, 2021-11-24 13:33:19

How to configure basic-auth access for a user in kubernetes dashboard?

I set up kube-apiserver and kubernetes-dashboard and created a user as described in the guide https://techexpert.tips/kubernetes/kubernetes-dash... I

just --basic-auth-filechanged it to --token-auth-file

In auth.csv I wrote the following:
password,admin,admin,"system:masters"

Everything works except for one thing: after logging in, I no namespaces other than default are available. And in the tray with notifications there are a lot of messages like

statefulsets.apps is forbidden: User "system:anonymous" cannot list resource "statefulsets" in API group "apps" in the namespace "default"

daemonsets.apps is forbidden: User "system:anonymous" cannot list resource "daemonsets" in API group "apps" in the namespace "default"

replicasets.apps is forbidden: User "system:anonymous" cannot list resource "replicasets" in API group "apps" in the namespace "default"

deployments.apps is forbidden: User "system: anonymous" cannot list resource "deployments" in API group "apps" in the namespace "default"


That is, as far as I understood, what I specified for the user system:mastersdid not work

. I also tried to configure access to the user by doingClusterRoleBinding

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: admin-user
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
- kind: User
  name: admin
  namespace: kubernetes-dashboard


Which didn't help either.

Please help to make this user access to all resources. Or maybe point to specific resources.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question