How to Configure JetBrains AI Kubernetes Approval

Published
Length
3 min read

Luis Felipe Dias

All posts

To set up jetbrains ai kubernetes approval, you restrict local kubeconfig roles and require human checks before running cluster commands. You combine native Kubernetes role rules with manual review in your editor before any action runs. Engineering teams often link their code editor to a live cluster to speed up daily work. The AI assistant reads local files and suggests commands to fix broken pods or update deployments. When a developer uses broad admin keys on their laptop, the assistant inhe

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.

To set up jetbrains ai kubernetes approval, you restrict local kubeconfig roles and require human checks before running cluster commands. You combine native Kubernetes role rules with manual review in your editor before any action runs.

Engineering teams often link their code editor to a live cluster to speed up daily work. The AI assistant reads local files and suggests commands to fix broken pods or update deployments. When a developer uses broad admin keys on their laptop, the assistant inherits those exact same rights. One bad prompt can delete a live workload or expose secret keys across the whole cluster.

How jetbrains ai kubernetes approval works with native RBAC

Your first step is to shrink the permissions tied to the developer's local cluster user. Kubernetes uses Role-Based Access Control to govern what an identity can do on the API server. In this model, permissions are purely additive, and there are no deny rules.

You can define a Role to set permissions inside a single namespace for daily work. If a user needs rights across all namespaces or on cluster nodes, you define a ClusterRole instead. Next, you attach those rules to the user with a RoleBinding for one namespace. You use a ClusterRoleBinding only when the user needs access across the entire cluster.

To keep the AI assistant from changing live apps, give the local user read-only role rules. You can allow pod log reads by adding the pods and log subresource to the role. Leave out write verbs and the pods exec subresource so the user cannot run shell commands in containers. Within the editor, the developer must still read and approve each suggested command before it runs in the terminal.

What native roles solve and what they leave open

Native Kubernetes roles do a great job of deciding who can reach the cluster API. They block unauthorized users from touching namespaces or reading cluster objects they do not own. When you limit a developer to read-only rights, the AI assistant cannot delete pods on their behalf.

Still, static roles create a hard roadblock when an engineer needs to fix a live bug. If a user has no write rights, they cannot restart a stuck pod or run a quick check. Teams often work around this by granting broad roles for a full day or sharing admin keys. Once the user holds that broad role, Kubernetes does not ask for approval on individual commands.

Approval Chains & Escalation + Kubernetes RBAC: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

A role binding checks the user identity at login, not the safety of each command in flight. If a role allows pod exec, the API server lets any shell command run inside that container. Native RBAC also cannot rewrite sensitive text like emails, phone numbers, or card numbers in pod logs. The cluster sends the full log output back to the local editor and the AI prompt window.

Why command-level approval matters for AI assistants

Relying on a tired human to read every AI suggestion in an editor is risky. Long commands can hide destructive flags or target the wrong namespace by mistake. A true approval flow needs to pause risky actions at the command level before they hit the cluster.

Instead of giving a user permanent write roles, teams should require a peer check for write commands. Read requests for pod status can go through right away, while exec or delete calls wait for a teammate's sign-off. Masking rules can also rewrite national IDs and card numbers in output streams before they reach the editor.

Add request guardrails and response masking beside Kubernetes

Cluster roles and service accounts govern who reaches the Kubernetes API. Still, a broad role or agent can delete workloads or print sensitive values from ConfigMaps and logs. In practice, hoop.dev runs beside the API server as a sidecar for your Kubernetes API and checks every request and response alongside RBAC.

With hoop.dev Kubernetes controls, guardrails can allow listing Secret names while refusing reads of Secret data before execution. Data masking redacts matched keys in returned JSON responses and log streams in memory. Furthermore, hoop.dev holds SOC 2 Type II and is MIT licensed on GitHub.

Frequently asked questions

Can Kubernetes RBAC require approval for a single command?

No, native Kubernetes RBAC does not pause individual commands for human sign-off. Once a RoleBinding or ClusterRoleBinding grants a verb, the user can run it at any time.

How do I stop an AI assistant from running shell commands in pods?

Remove the pods exec subresource from the Role or ClusterRole bound to the developer's identity. Because Kubernetes permissions are additive, leaving that rule out blocks container shell sessions.

Does limiting a Role hide sensitive data inside pod logs?

No, granting the pods log subresource lets the user read the entire log stream for that pod. Native RBAC cannot rewrite emails, phone numbers, or card numbers inside the log text.

The query runs. The emails stay hidden.