Kubernetes Scom Monitoring

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up kubernetes scom monitoring by creating a read-only role for your monitoring account. This role lets the tool read cluster state and logs through the Kubernetes API. Teams often attach a broad cluster role to get metrics working fast. Overly broad roles give monitoring accounts or operators power to change workloads or read sensitive data. How kubernetes scom monitoring works with native roles Kubernetes uses role-based rules to control what users and accounts can do. These rules ar

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

You set up kubernetes scom monitoring by creating a read-only role for your monitoring account. This role lets the tool read cluster state and logs through the Kubernetes API. Teams often attach a broad cluster role to get metrics working fast. Overly broad roles give monitoring accounts or operators power to change workloads or read sensitive data.

How kubernetes scom monitoring works with native roles

Kubernetes uses role-based rules to control what users and accounts can do. These rules are additive, which means there are no deny rules in the system. You start with zero rights and add rules for each needed action.

A standard role sets permissions inside one single namespace. A cluster role is not limited to one namespace. It can cover cluster-wide items like nodes and non-resource endpoints. It can also cover namespaced items across all namespaces at once.

For kubernetes scom monitoring, the tool needs to see nodes, pods, and events across the cluster. Teams use a cluster role to define these read permissions in one place. Then they use a cluster role binding to grant those permissions across the entire cluster. If a team only wants to watch one namespace, they use a role binding instead. A role binding can point to a local role or reuse a shared cluster role.

The API also separates main resources from subresources like pod logs or pod exec. In your rules, you write a subresource with a slash, such as pods and log. A monitoring account needs read rights on pod log subresources to collect container output. It does not need rights on the pod exec subresource, which runs commands inside containers.

What native roles solve and what they leave open

Native roles and bindings decide who can talk to the API and which endpoints work. This setup stops a monitoring account from deleting pods or editing deployments. It separates read-only health checks from admin tasks.

Still, a serious gap remains when an alert fires in your dashboard. An engineer must log in to the cluster to inspect the failing pod and fix it. Once you grant that engineer pod exec rights, the native role only checks the initial request. It does not inspect the shell commands that run inside the container session.

Kubernetes RBAC: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Also, pod logs and command outputs often contain raw user emails, phone numbers, or card numbers. Native roles let a user read the whole log stream or none of it. They cannot rewrite sensitive fields in results before the data reaches the screen. Teams need a way to govern live commands and mask sensitive fields in flight.

Scoping permissions for alerts and human responders

To keep your cluster safe, split machine monitoring accounts from human responder accounts. Give the machine account a cluster role with read verbs on nodes, pods, and pod logs. Never add write verbs or pod exec rules to the monitoring role.

For human engineers who respond to alerts, avoid permanent cluster-wide admin bindings. Bind their roles to specific namespaces where their apps run. Keep in mind that native resource name limits do not block subresource creation the way teams expect. You must still control what happens inside interactive sessions after the API grants entry.

Govern kubectl and API calls in flight

Identity providers and Kubernetes RBAC decide who logs into a cluster. They cannot redact keys inside returned JSON objects or hold a risky delete call for review. By design, hoop.dev runs as an open-source proxy, a sidecar for your Kubernetes API, checking requests and responses without replacing RBAC.

First, hoop.dev guardrails refuse banned methods, paths, or headers before they run. Next, hoop.dev data masking rewrites sensitive keys in returned Secret, ConfigMap, and log responses in memory, and writes each decision to the audit trail. Explore the repo on GitHub.

Frequently asked questions

What permissions does a Kubernetes monitoring account need?

It needs a cluster role with read permissions on nodes, namespaces, pods, and events. If it collects container output, also include read access to the pod log subresource.

Can native Kubernetes RBAC block specific shell commands inside a pod?

No, native roles only check if a user can open the pod exec subresource. Once the session starts, Kubernetes does not filter or block individual shell commands.

Should I use a RoleBinding or ClusterRoleBinding for monitoring?

Use a cluster role binding when the tool must check nodes and pods across all namespaces. Use a role binding if the tool only watches workloads inside one specific namespace.

The query runs. The emails stay hidden.