Skip to main content
The Kubernetes integration gives sureops agents access to your cluster’s API for pod and deployment inspection, log retrieval, event queries, and (with approval) remediation actions such as pod restarts and scaling operations.

What this integration enables

  • Pod inspection — agents read pod status, restart counts, resource utilization, and readiness state for affected services
  • Deployment state — agents check current replica counts, rollout status, and recent rollout history
  • Cluster events — agents query Kubernetes events correlated with incident timing to surface scheduling failures, OOM kills, and node pressure
  • Container logs — agents retrieve container logs from affected pods for the incident time window
  • Remediation actions — with explicit HITL approval, the resolution specialist can restart deployments, adjust replica counts, or patch a workload’s spec. These are gated by Human-in-the-Loop by default, and a remediation classified high-risk — or one whose risk sureops can’t classify — always pauses for a human, regardless of control mode or auto-approve settings. Five carve-outs always require explicit approval and none can be turned off: P1/P2-severity incidents, recommendations that open a fix PR, high-risk or unclassifiable actions, diagnoses rebuilt from incomplete evidence, and diagnoses started from the stage card while someone holds control. A lower-risk remediation on a P3/P4 incident can be auto-approved like any other recommendation if your org has opted in. See HITL Gates for the full rule set.

Prerequisites

  • An environment selected in the top-right context switcher — Settings → Environment → Integrations is scoped to that environment and stays disabled until one is selected
  • A Kubernetes cluster
  • The k8s-mcp server running inside your cluster or accessible from sureops with an appropriate kubeconfig or service account token
Integration connections are per-environment. Connecting Kubernetes here only applies to the environment that was selected in the context switcher at the time — it does not carry over to your other environments. Repeat this connect flow for each environment that needs Kubernetes.

Setup

1

Stand up k8s-mcp

Deploy k8s-mcp inside your cluster (recommended) or on infrastructure with access to your cluster’s API server. If you’re using the sureops demo environment, k8s-mcp is already provisioned in-cluster — you can skip this step.For your own cluster, sureops runs kubernetes-mcp-server — deploy it as a Kubernetes Deployment with a scoped ServiceAccount bound to a Role (see Scoping k8s-mcp permissions below), and expose it inside your cluster or wherever sureops can reach it. The service account needs read access to pods, deployments, events, and logs, plus update/patch on Deployments/ReplicaSets/StatefulSets/DaemonSets, and the scale subresource specifically for Deployments and StatefulSets, for remediation — never delete on pods or exec.
2

Connect in sureops

In sureops, go to Settings → Environment → Integrations and click Connect next to Kubernetes.Fill in:
  • Integration Name — prefilled; change it if you need to tell two configurations of this integration apart
  • MCP Server Endpoint — the URL of your running k8s-mcp server (e.g. https://k8s-mcp.internal.company.com/mcp)
  • Bearer Token — the token your k8s-mcp endpoint (or the proxy in front of it) expects. sureops always sends this to k8s-mcp as an Authorization: Bearer header, so there is no authentication method to choose. The form won’t save a blank token, so if nothing in front of k8s-mcp checks a token, put it behind an ingress or proxy that does.
Click Save & Connect.

Required credentials


Scoping k8s-mcp permissions

The level of access you grant k8s-mcp determines what sureops agents can do. Every real remediation mutates a pod spec through its owning controller (Deployment, StatefulSet, etc.) — never a pod directly: Grant only the permissions you want sureops to have. The read-only rows (the first five) are sufficient for diagnosis-only use; resolution actions need the update/patch rows as well. Also grant read access (get/list/watch on configmaps) to any ConfigMaps your services need for diagnosis — scope this to the specific names your workloads use rather than a blanket grant. sureops never needs create/delete on a workload resource, or pods/exec. Its remediation model works entirely by patching an existing controller’s spec, so those verbs are never required, and the Role sureops provisions for a sureops-supplied demo cluster deliberately excludes them — by design, not oversight.
That’s a statement about what sureops needs and what we grant — not a guarantee enforced on your cluster. The upstream k8s-mcp image still exposes delete and exec tools, and sureops auto-enables write tools that your Role actually makes reachable. So if you bind a broad or cluster-admin ServiceAccount, those destructive tools become available. Scope the Role yourself to the verbs in the table above — don’t rely on sureops to refuse permissions you granted it.

Common errors


Official documentation