Azure Kubernetes Service (AKS) dashboard access error “forbidden”

There is a very common error when accessing Kubernetes Dashboard via proxy from remote machine. You can solve this error easily by granting ClusterRole to allow access to the dashboard

Create new file and insert following details

nano k8s-dashboard-access.yaml

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 kube-dashboard-access.yaml

Posted by justinpham

Leave a Reply