Checking Kubernetes RBAC and NetworkPolicy access
API permissions or Pod-to-Pod HTTP access differ from expectations.
Problem
API permissions or Pod-to-Pod HTTP access differ from expectations.
Cause
Lab RBAC limits resource permissions, while NetworkPolicy restricts traffic by client label.
Solution
Check resource permissions for the service account separately. On a CNI that supports network policy, compare HTTP results for allowed and denied test clients.
kubectl auth can-i list pods -n NAMESPACE
kubectl get networkpolicy -n NAMESPACE