How to Configure Continue Kubernetes Prevent Delete

Published
Length
3 min read

Luis Felipe Dias

All posts

To set up a continue kubernetes prevent delete workflow, restrict the local user role. You must remove delete actions from the Kubernetes Role or ClusterRole that the coding assistant uses. Engineering teams often give coding tools the same local credentials that human developers use every day. When those roles hold broad cluster permissions, an automated prompt can wipe out active workloads fast. How a continue kubernetes prevent delete setup works in RBAC Continue runs on a developer machin

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 a continue kubernetes prevent delete workflow, restrict the local user role. You must remove delete actions from the Kubernetes Role or ClusterRole that the coding assistant uses. Engineering teams often give coding tools the same local credentials that human developers use every day. When those roles hold broad cluster permissions, an automated prompt can wipe out active workloads fast.

How a continue kubernetes prevent delete setup works in RBAC

Continue runs on a developer machine and executes commands using the local cluster credentials on that workstation. When the assistant suggests or runs a cluster command, the Kubernetes API server checks those local credentials. Kubernetes Role-Based Access Control, known as RBAC, uses purely additive rules to grant cluster permissions. There are no explicit deny rules in native Kubernetes RBAC.

To stop deletions, you must build a new Role from scratch that leaves out delete verbs. A Role sets permissions within a single namespace, while a ClusterRole covers resources across the entire cluster. You attach these rules to a user or service account with a RoleBinding or a ClusterRoleBinding. A RoleBinding grants permissions inside one namespace, and it can reference a Role or a ClusterRole. A ClusterRoleBinding grants access across the entire cluster at once.

To let the coding assistant inspect workloads safely, grant only read actions on pods and pod logs. In Kubernetes RBAC, subresources like pod logs use a slash between the resource and the subresource name. If you leave delete actions out of the bound role, the API server blocks any deletion request. The coding assistant can still read state and help debug issues without removing active cluster resources.

Why static RBAC roles fall short for coding assistants

Static RBAC roles solve the basic problem of who can log in and call specific API endpoints. Removing delete verbs from a role stops direct resource removal through standard API calls. Still, native RBAC only checks the identity and the resource type at the moment of the request. It does not inspect what happens inside an interactive pod session or evaluate context in flight.

Developers often need to run commands inside containers or update workloads during a normal work shift. Because Continue shares the local user identity, separating assistant actions from human actions is very hard. If a developer holds a role that allows pod execution, the assistant inherits that exact same power. It can open a shell inside a running pod and delete files or drop data from inside.

Creating separate service accounts for every coding tool also adds heavy toil for platform teams. Engineers end up switching contexts all day, or they bypass the restricted role to get work done. Also, pod logs and cluster configs often hold sensitive data like emails, phone numbers, and card numbers. Native RBAC cannot rewrite those matched fields in results before they reach the coding assistant prompt.

Kubernetes RBAC + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Adding command-level controls for cluster safety

A safer setup separates login identity from the individual commands that run during a coding session. Instead of relying only on coarse role bindings, teams need controls that check every command in flight. When an assistant tries to delete a deployment or run a risky script, that specific action pauses. A human reviewer can then approve or reject the single command before it touches the cluster.

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

Can I add a deny rule in Kubernetes RBAC to block delete commands?

No, Kubernetes RBAC permissions are purely additive and do not support explicit deny rules. To block deletions, you must bind a Role or ClusterRole that omits delete verbs.

How does Continue authenticate to a Kubernetes cluster?

Continue uses the local workstation context and credentials of the developer who runs the editor. Every command it runs carries the same RBAC permissions assigned to that local user account.

Does blocking pod deletion also block running commands inside pods?

No, pod deletion and pod execution are separate permissions in the Kubernetes API server. You must also omit the exec subresource from the role to stop commands inside containers.

Short role checks help teams work fast. Simple rules make each review clear. Good logs keep every team safe. Scoped keys stop bad changes early.

Teams test new role rules in staging first. Clear owner lists speed up each audit. Small role scopes cut down on risk. Regular log checks catch drift right away.

The query runs. The emails stay hidden.