What are the risks of the Kubernetes API's `exec`, `proxy` and `portforward` subresources?
AdvancedConceptSecurity: RBAC, ServiceAccounts & Pod Security
Answer
pods/exec gives a shell inside any container the user can reach, including reading mounted Secrets and tokens; nodes/proxy can reach the kubelet API and execute in Pods on that node; pods/portforward bypasses NetworkPolicy from the user's side. Grant them rarely and audit them.