Problem Statement
You have access to a pod in scope. Outline a safe Kubernetes enumeration workflow.
Explanation
Check service account tokens and permissions with kubectl using in-cluster config. List only what is allowed: namespace, pods, services, and roles. Never modify resources. Confirm if the pod can talk to the API server and which verbs work. Record exact commands and outputs. Stop if you hit errors that suggest missing rights; do not try to bypass controls.
Code Solution
SolutionRead Only
kubectl auth can-i --list kubectl get ns kubectl get pods -A --field-selector=spec.nodeName=$(hostname)
