Skip to content
GitHub (opens in a new tab)

Cloud & infrastructure · MCP Firewall integration

Put AI cluster access behind namespace rules and approvals.

Use GateRook’s MCP Firewall to separate Kubernetes inspection from changes. Connect with a token or kubeconfig, restrict namespaces, and enable pod logs only where needed. Enabled rollout restarts and manifest applies wait for approval, while Kubernetes RBAC continues to enforce the identity’s permissions.

Kubernetes, in your AI workflow

Illustrative example

Connection in GateRook

stage-k8s

Kubernetes

stage / QA
Sign in with
kubeconfig-file
kubeconfig file
~/.kube/config
Context
stage
Default namespace
default

The security boundary

Your AI requests a tool. GateRook checks its mode and policy, requires approval when configured, and resolves credentials locally before an allowed call runs.

Understand the request flow

Ask your AI

Show the pods for the API service in the stage cluster.

k8s_get · arguments
{
  "connection": "stage-k8s",
  "kind": "pods",
  "namespace": "default",
  "labelSelector": "app=api",
  "limit": 10
}
Example result
{
  "mode": "list",
  "connection": "stage-k8s",
  "kind": "pods",
  "namespace": "default",
  "columns": [
    "Name",
    "Ready",
    "Status",
    "Restarts"
  ],
  "rows": [
    {
      "name": "api-6c87f9d4c7-r7k2m",
      "namespace": "default",
      "cells": [
        "api-6c87f9d4c7-r7k2m",
        "1/1",
        "Running",
        0
      ]
    }
  ],
  "cursor": null,
  "truncated": false
}

Sample configuration and output, not a live connection. Replace example values with your environment. Tool names here are connector names; the endpoint may expose a connection-specific name.

Useful access. Explicit control.

What you can do with Kubernetes and AI

Explain an unhealthy workload

Ask AI to combine pod status, deployment conditions and events. Enable the log tool when a bounded container log is needed to explain a failure.

Review a restart

Have AI identify a deployment and request a rollout restart. GateRook shows the target and exact action; execution waits for your decision.

Inspect a manifest change

When apply is enabled, review the server dry-run diff before approving. The proposed manifest and affected objects stay visible instead of relying on an AI summary.

From service to MCP Firewall

How to connect Kubernetes

GateRook must be running on a computer that can reach your service. Open Connections, choose Add connection, and select Kubernetes. Give the connection a name and environment.

New to GateRook? Start with the full setup guide.
  1. Choose a cluster identity

    Prepare a kubeconfig context or API token with Kubernetes RBAC access to the resources you want AI to inspect. For the token method, provide the HTTPS API server and its CA certificate when it is not trusted by the OS.

  2. Add and test the connection

    Add Kubernetes as stage-k8s in the stage environment. Select the authentication method, context and default namespace, then run Test connection. For a kubeconfig file, review the cluster GateRook will pin.

  3. Review credential plugins

    If the kubeconfig invokes an external credential command, explicitly allow and review that command. It runs on this computer with your user permissions. A changed command or cluster must be trusted again.

  4. Choose reads and permitted changes

    Set namespace and resource restrictions in Policies. Start with k8s_get. Enable pod logs separately if required; expose restart or apply only for the workflows you intend to review.

  5. Choose the endpoint and tool modes

    Add the tested connection to an endpoint. In Tools & policies, enable only the tools needed for the task. Start with Read only where supported; use Approval for any selected mutation and leave other tools Off. A connection alone does not grant an AI client access.

  6. Connect your AI and verify the first call

    In Clients, choose your AI app and endpoint, review the connection details, and connect. Try this guide’s example in Playground before asking your AI. Open Activity to inspect the tool, target, decision and returned result. The getting started guide covers this shared flow.

Connection settings

Configure Kubernetes in GateRook

These are example values for the connection form. Enter credentials into GateRook’s secret fields, not into an AI prompt. Requirements and alternatives are noted per field.

Kubernetes connection configuration
SettingExampleHow to use it
Sign in withkubeconfig-fileUse a local kubeconfig file, paste kubeconfig into a protected field, or supply an HTTPS API server and token.
kubeconfig file~/.kube/configThis path is read on the computer running GateRook.
ContextstageChoose the intended context explicitly; Test connection verifies the target cluster.
Default namespacedefaultCalls use this namespace unless another permitted namespace is requested.
Run the credential command from kubeconfigfalseEnable only if your kubeconfig needs an exec credential plugin. Review the command during connection testing before allowing it.

Know what you expose

Kubernetes tools and access boundaries

The connector defines available operations. GateRook’s MCP Firewall enforces endpoint modes and connection policies before an AI client can use them.

Available tools and access behavior
ToolPurposeAccess behavior
k8s_getList resources or inspect one object with its events and rollout state. Supports selectors, pagination and allowed namespaces. Kubernetes Secret values are masked.Read only
k8s_logsRead a bounded tail of one container log by pod name or deployment/name. Enable it explicitly when log access is needed.Off by default
k8s_rollout_restartRestart a deployment, statefulset or daemonset after approval. Defaults to Approval outside prod and Off in prod.Approval / Off in prod
k8s_applyApply up to twenty YAML or JSON objects after reviewing the exact diff from the API server dry run. It must be enabled explicitly.Off by default

Before you enable access

  • Kubernetes RBAC and GateRook policies both apply. Exposing a tool does not give the cluster identity additional permissions.
  • Pod logs are off by default. Logs may contain application data, so enable the tool only for the namespaces and workloads you intend to share with the AI client.
  • Manifest apply and rollout restart require approval when enabled. Rollout restart defaults to Off in prod; apply defaults to Off everywhere.
  • A pinned kubeconfig target changing stops calls until the connection is tested and trusted again. Skipping TLS verification is forbidden for prod connections.

GateRook stores local connection secrets encrypted and resolves them for connectors. Allowed tool results are returned to your AI client and may be processed by its provider. Scope the data you expose as well as the actions you allow.

Practical answers

Kubernetes connection questions

Use Test connection to isolate service access problems. Use Playground and Activity to inspect endpoint permissions and tool calls.

Can I use an existing kubeconfig?

Yes. Select a kubeconfig file and context, or paste kubeconfig into its protected field. A local file is checked during Test connection and its cluster identity is pinned.

Will AI be able to run arbitrary kubectl commands?

This connector exposes four specific MCP tools, not a general kubectl shell. The endpoint modes, namespace policy and cluster RBAC determine what those tools may do.

How are Kubernetes changes approved?

A rollout restart shows the exact target. Manifest apply shows the diff returned by the API server dry run. Enabled changes execute only after approval; a denied or unanswered request does not run.

Keep exploring

AWS

Inspect AWS through GateRook’s MCP Firewall. Scope accounts and regions, keep credentials local, and expose read-only resource and CloudWatch tools.

Google Cloud

Control Google Cloud access through GateRook. Keep service account keys local, scope read-only inventory and monitoring, and enable log access deliberately.

SSH

Control AI access to SSH with GateRook. Verify host keys, use predefined runbooks and review rendered commands before approving server changes.

Browse all integration guides

Your MCP Firewall. Your access rules.

Control AI access to Kubernetes.

Start with read-only access. Approve changes. Inspect the audit trail.

Read the getting started guide

Get GateRook

Download GateRook 0.9.2 for your Mac, or get the Windows app from Microsoft Store.

macOS

Version 0.9.2 for Apple Silicon (arm64). This download does not support Intel Macs.

Open the DMG and drag GateRook to Applications.

Windows

Available for free from Microsoft Store. Install GateRook and receive updates through the Store.

macOS release notes and checksums (opens in a new tab)