[k8s] Kubernetes dashboard access warnings
Accessing your Kubernetes dashboard through proxy you might experience this warning.
Sample text: configmaps is forbidden: User “system:serviceaccount:kube-system:kubernetes-dashboard” cannot list configmaps in the namespace “default”
Resolution: From the message it is apparent that, access to the dashboard is restricted. Solution is to add the required rolebinding as below.
Two ways to do it. You can create the binding with simple one liner from CLI or YAML way.
$ kubectl create clusterrolebinding kubernetes-dashboard --clusterrole=cluster-admin --serviceaccount=kube-system:kubernetes-dashboard
or YAML way to create the role binding. Create the below Yaml file with some name say “dashboard-rolebinding.yaml” and submit for creation in the same Kubectl.
apiVersion: rbac.authorization.k8s.io/v1beta1 kind: ClusterRoleBinding metadata: name: kubernetes-dashboard labels: k8s-app: kubernetes-dashboard roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: cluster-admin subjects: - kind: ServiceAccount name: kubernetes-dashboard namespace: kube-system $ kubectl create -f dashboard-rolebinding.yaml
PS- I had this experience when I access my AKS cluster, so not sure about other providers or distribution at this time of writing.
update:
$kubectl proxy
-
Recent
- The ID token is not yet valid. Make sure your computer’s time and time zone are both correct. Current epoch = 1689517128
- .NET Core – How to create a .NET GUI app which runs across the platform
- AKS 2022 updates
- Linux firewall and connectivity issues
- Microsoft Ignite (Sep22-24) event recap & On-demand sessions
- [Linux] Steps to install and configure sysstat package for monitoring.
- Azure Security Enablement – Centralized place for all the links
- Presenting tech session with stories [linkedin learning notes]
- gRPC using .NET core notes
- .NET in 2020 (Build recap)
- #KubeCon CNCF – North America 2019 watchlist
- AKS CLI Sheetcheat for the labs
-
Links
You must be logged in to post a comment.