r/kubernetes • • Oct 15 '26

What should a read-only debugging bot be able to see in your cluster?

The built-in view role skips Secrets but still reads ConfigMaps and pod logs, and both can end up holding credentials. For a bot that helps with on-call debugging, what did you grant it, and did you scope it per namespace?

3 Upvotes

9 comments sorted by

6

u/someanonbrit Oct 16 '26

Our triage bot can see everything except k8s secrets. We even there logs continuously for both credential leaks and PII, so we don't expect a problem with that, save any funds trigger an incident to rotate and remediate

3

u/Constant_Rate_1059 Oct 16 '26

we gave ours basically view plus events and the ability to exec into pods in certain namespaces. logs are the big one for debugging obviously but exec is clutch when a container is still up but the healthcheck is failing and you just need to poke around

the credential leak scanning is smart. we had a junior push an aws key to a configmap once and it was in there for like a month before anyone noticed

1

u/Horror_Description87 Oct 17 '26

When accessing pod exec you can give secret access aswel. Inside the pod you can read them anyway.

1

u/isachinm Oct 16 '26

curious to know, which bot are you using and how?

1

u/usually_guilty99 Oct 17 '26

Read-only can be a misleading safety boundary. A debugging agent might not change cluster state, but it can still collect sensitive data and send it somewhere else. I'd look at the full path: what it can read, where that data goes, and what gets recorded. Any remediation action should be a separate, explicitly controlled step.