In a kubernetes cluster I am trying to understand how the kubectl exec
is used by the users. Users are exec'ing into which pods in which namespaces? What is the best way to discover that?
I think the audit logs are a good starting point but I am not sure whether I would find what I am looking for there.
Yes, the
pod/exec
request is tracked just like any other request in the audit log, and it even appears to track the command issued (although that won't be as helpful if the command is justsh
orbash
)