KubeBolt docs
ENES GitHub

Kobi

Actions & Governance

The full action surface, RBAC enforcement, dry-run previews, the Kobi governance switches, and the audit trail behind every mutation.

On this page
  1. The action surface
  2. Dry-run preview
  3. Governance switches
  4. Kobi Autopilot’s actions
  5. Audit trail

KubeBolt does not only observe — it acts. Actions reach the cluster from a person — a UI action on a resource page, or a call with an API token — from a Kobi Copilot proposal a person approves in chat, and, on KubeBolt Cloud, from Kobi Autopilot. Every one of them is RBAC-enforced, most can be previewed before they run, and all of them are recorded in the audit trail. This page covers the action surface and the controls around it.

The action surface

The API and the UI ship more actions than Kobi can propose. Kobi’s propose_* tools are a curated subset — the nine changes that are useful to reason about in a conversation.

ActionEndpointRoleKobi can propose
Rolling restartPOST …/restartEditorpropose_restart_workload
Scale replicasPOST …/scaleEditorpropose_scale_workload
Roll back a Deployment, StatefulSet or DaemonSetPOST …/rollbackEditorpropose_rollback_deployment (Deployments)
Set container imagePOST …/set-imageEditorpropose_set_image
Set requests / limitsPOST …/set-resourcesEditorpropose_set_resources
Set environment variablesPOST …/set-envEditorpropose_set_env
HPA min/max replicasPOST /resources/hpas/…/set-boundsEditorpropose_patch_hpa
Ephemeral debug containerPOST …/debugEditorpropose_debug_pod
Delete a resourceDELETE /resources/{type}/{ns}/{name}Adminpropose_delete_resource
Apply edited YAMLPUT …/yamlEditor—
Create from a manifestPOST /resources/{type}/{ns}Editor—
Edit labels and annotationsPOST …/edit-metadataEditor—
Reveal a Secret valuePOST /resources/secrets/…/revealEditor, Admin in production namespaces—
Cordon / uncordon a nodePOST …/cordon · …/uncordonEditor—
Evict a podPOST …/evictEditor—
Pause / resume a rolloutPOST …/rollout-pause · …/rollout-resumeEditor—
CronJob suspend / resume / triggerPOST …/suspend · …/resume · …/triggerEditor—
Drain a nodePOST …/drain (GET tracks, DELETE cancels)Admin—
Open a port-forwardPOST /portforwardEditor—

Drain sits with delete at Admin because evicting every pod on a node can violate PodDisruptionBudgets and degrade cluster capacity. Cordon and uncordon stay at Editor — they only flip a scheduling flag. A single-pod evict is Editor too: it goes through the policy/v1 Eviction API, so a PDB that would be violated returns 429 instead of a disruption.

Every record names its source, decided by the server from who made the request — a request can claim one with the X-KubeBolt-Action-Source header, but the claim alone is not believed:

SourceWhen
uiA person in a browser session
apiA person’s API token
copilot_proposalA Kobi proposal executed from the person’s own session and their own conversation
autopilotKobi Autopilot, calling with its service token

A claim that wasn’t believed stays in the record as claimedSource. The same actor names the write in the cluster: Kubernetes records the field manager kubebolt for a person, kubebolt-kobi for a Copilot proposal and kubebolt-autopilot for Autopilot in the object’s managedFields. A manager name is what the write claims to be, not who made it: any client can write with any field manager, and Kobi reads it that way. A Copilot record links to the conversation that proposed it, an Autopilot record to its run and incident, and an action that started from an insight keeps the originating insight id, so the audit trail can be walked from symptom to fix.

Dry-run preview

Every action Kobi can propose accepts ?dryRun=true — restart, scale, rollback, set-image, set-resources, set-env, set-bounds, debug, and delete. The dry run goes through full admission (dryRun=All), so quota violations, LimitRanges and admission webhooks surface before you approve, with the quota detail parsed out of the apiserver’s error rather than shown raw. Kobi’s action card runs that preview automatically for every proposal, before you can click Execute. A dry run is never audited and never persists anything.

Governance switches

Two toggles bound what Kobi Copilot may execute. Both default to on, and both can be changed without a restart as Kobi actions and Destructive actions in Administration → AI (Kobi) → Configuration — on KubeBolt Cloud, Administration → AI & Autopilot → Kobi Copilot:

Env varDefaultEffect when off
KUBEBOLT_AI_ACTIONS_ENABLEDtrueThe propose_* tools are withheld from the model entirely. Kobi still diagnoses and recommends, and offers the equivalent kubectl command instead.
KUBEBOLT_AI_DESTRUCTIVE_ACTIONS_ENABLEDtrueDelete is withheld from the model, and the action endpoints reject a Kobi-proposed delete or scale-to-zero with a 403 that names the policy, not your role. Scale-to-zero shares the non-destructive scale tool, so it cannot be filtered out of the tool list.

How to set them with Helm or Docker Compose is in Enabling Kobi.

These two switches govern Kobi Copilot’s proposals only — the server-side gate matches on X-KubeBolt-Action-Source: copilot_proposal. A UI action from a resource page is governed by RBAC, not by these toggles, and Autopilot has its own controls (below). Turning KUBEBOLT_AI_ACTIONS_ENABLED off makes Kobi advisory; it does not make the install read-only. For that, give people the Viewer role.

Together they let you match the blast radius to the environment: full proposal and execution in dev, diagnosis only in production, for example.

Kobi Autopilot’s actions

On KubeBolt Cloud, Autopilot executes through the same endpoints, with its own service token, and its records carry the source autopilot. It has a smaller, fixed surface than Copilot, and its own controls:

Autopilot actionWhat it changes
restart_deploymentRolling restart of a Deployment
scale_deploymentReplica count of a Deployment
rollback_deploymentRoll a Deployment back to an earlier revision
patch_deployment_resourcesCPU/memory requests and limits of a workload
patch_hpaAn HPA’s minReplicas / maxReplicas
patch_probeA workload’s readiness or liveness probe timings
verify_pods_readyNothing — waits for the pods to be Ready (180 s by default)
inform_onlyNothing — tells a person what to do, for a cause outside the cluster

The modes and the incident pipeline are in Meet Kobi; the settings are in KubeBolt Cloud.

Audit trail

Every mutation is persisted with the operator’s identity and role, the action source, the parameters applied, and the result. Admin changes — settings, connectors, clusters, insight policies, integrations — are recorded the same way, without their request bodies. The trail is read through the API — there is no audit page in the UI:

curl -H "Authorization: Bearer $TOKEN" \
  "https://kubebolt.example.com/api/v1/admin/actions?class=mutation&limit=200"

GET /api/v1/admin/actions is admin only and returns the newest records first. class is mutation, access or all (the default); limit defaults to 100 (maximum 1000). Since 2.7.0 the class applies before the limit, so a filtered page fills up to it; a record written before records carried a class reads as a mutation. Records are pruned after KUBEBOLT_AUDIT_RETENTION_HORIZON (default 2160h, 90 days).

Each record names the cluster it acted on: the one the request resolved for mutations and the cluster-scoped integration routes (since 2.6.7), and the one the access reached for terminals, port-forwards and file reads (since 2.6.4). Records written earlier may carry the install’s default cluster instead. A set-env record keeps the names and sources of the variables it changed, never their values, in the trail and in the API log; older records are cleaned at startup.

Two action types carry extra audit weight:

Actions always run under the detected RBAC permissions — Kobi can never do more than the cluster grants. See RBAC for how KubeBolt detects and adapts to the permissions of the credentials it connects with (a kubeconfig, its own ServiceAccount, or the agent’s), and Connecting Clusters for the agent’s three permission tiers.