Self-service Kubernetes Deployment Portal

Published
Length
3 min read

Luis Felipe Dias

All posts

You build a self service kubernetes deployment portal by tying user groups to role rules. These rules let developers deploy apps without waiting on tickets from platform teams. Many teams start by giving developers broad cluster rights to move fast. Overly broad permissions let one bad update or command break shared services across namespaces. How a self service kubernetes deployment portal works with RBAC A native portal relies on Kubernetes Role-Based Access Control to manage user actions.

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 build a self service kubernetes deployment portal by tying user groups to role rules. These rules let developers deploy apps without waiting on tickets from platform teams. Many teams start by giving developers broad cluster rights to move fast. Overly broad permissions let one bad update or command break shared services across namespaces.

How a self service kubernetes deployment portal works with RBAC

A native portal relies on Kubernetes Role-Based Access Control to manage user actions. The API server checks these rules before it allows any request to run. In Kubernetes, permissions are additive, which means there are no deny rules. You start with zero rights and add rules for each needed action.

A Role sets permissions inside one single namespace for your app team. A ClusterRole sets permissions across the whole cluster and covers nodes or all namespaces. To give a user these rights, you create a binding in the cluster. A RoleBinding grants permissions inside one namespace by linking users to a Role. A RoleBinding can also reference a shared ClusterRole to limit it to one namespace. A ClusterRoleBinding grants permissions across the entire cluster at once.

Your portal maps developer groups to a RoleBinding inside their own team namespace. This setup lets developers create deployments and read pod statuses on their own. For deeper checks, Kubernetes uses subresources like pod logs or pod exec sessions. RBAC rules write these subresources with a slash to separate the main resource. Platform teams must grant specific permissions on those subresources so developers can debug apps.

What native RBAC solves and what it leaves open

Native roles and bindings solve the basic problem of who can enter a namespace. They stop a developer on one team from changing apps owned by another team. Using a ClusterRole with a local RoleBinding also cuts down on duplicate rule files. Platform engineers can define one standard developer role and reuse it in many namespaces.

Still, native RBAC only checks if a user can call an API endpoint. It does not check what happens inside a session after the API call starts. If a role allows pod exec, the user can run any shell command inside. Native RBAC cannot approve single commands or mask sensitive data like emails or card numbers. Also, permissions stay active until an admin edits or deletes the binding. Teams still need a way to review sensitive actions and control live commands.

Self-Service Access Portals + Kubernetes RBAC: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Managing subresources and day-two debugging

A deployment portal must handle more than just pushing new container images to pods. Developers need to read logs and check running containers when an app fails. In Kubernetes, reading logs and running commands use subresources under the main pod resource.

If you grant access to the exec subresource, developers get full shell access inside pods. Native rules let you restrict access by resource names for some verbs. Yet you cannot use resource name limits on create requests for subresources. Once a developer has exec rights in a namespace, they can enter any pod there. Those pods often hold database keys or read customer phone numbers and national IDs. Without deeper controls, self-service portals trade away runtime safety for developer speed.

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

How do RoleBindings and ClusterRoleBindings differ in a portal setup?

A RoleBinding applies permissions inside a single namespace for a specific team. A ClusterRoleBinding applies permissions across every namespace and cluster resource at the same time.

Can I add a deny rule to block one deployment in Kubernetes RBAC?

No, Kubernetes RBAC rules are strictly additive and do not support deny rules. To block an action, you must remove the rule that grants that permission.

Why do developers need subresource permissions to debug their deployments?

Actions like viewing pod logs or opening a shell use subresources on the API. Standard pod read rules do not cover them, so you must grant subresource rules.

The query runs. The emails stay hidden.