Answer the question
In order to leave comments, you need to log in
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-file
changed 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"
system:masters
did not work ClusterRoleBinding
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
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question