Forum archive › Kubernetes & Helm Charts
ArchiveError from server (Forbidden): pods is forbidden: User \"system:anonymous\" cannot list resource \"pods\" in API group \"\" in the namespace \"default\"
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
Attachment: commands.txt
We do this for a living.
Kubernetes, DevOps and platform engineering, delivered in days — not another weekend lost to a stack trace.
Start a project →