Error from server (Forbidden): pods is forbidden: User "system:anonymous" cannot list resource "pods" in API group "" in the namespace "default"
Quote from moshe on 30/08/2022, 2:48 pmProblem
User tries to use different user other then kubernetes-admin and gets the following error
Error from server (Forbidden): pods is forbidden: User "system:anonymous" cannot list resource "pods" in API group "" in the namespace "default"
Solution
Switch context / namespace and set default namespace you have permissions
kubectl config set-context --current --namespace=<MYNAMESPACE>
Check the configured namespace
kubectl config view | grep -i namespace
Problem
User tries to use different user other then kubernetes-admin and gets the following error
Error from server (Forbidden): pods is forbidden: User "system:anonymous" cannot list resource "pods" in API group "" in the namespace "default"
Solution
Switch context / namespace and set default namespace you have permissions
kubectl config set-context --current --namespace=<MYNAMESPACE>
Check the configured namespace
kubectl config view | grep -i namespace
Uploaded files: