Kubernetes MCP server data privacy: what is logged and exported

The community containers/kubernetes-mcp-server has built-in telemetry controls: observability is off by default, export goes only to a backend you configure, and denied_resources can block the Secret kind. The supplied facts do not settle whether tool output appears in traces, how long logs are kept, or how HIPAA and GDPR apply, so those are items to verify in your own test environment.

On this page

Kubernetes MCP server data privacy: what the server records and exports

A security reviewer has to decide whether the server can expose Secrets or credentials through its logs, traces or metrics. The open-source containers/kubernetes-mcp-server is published under the Apache-2.0 license, and the supplied facts describe no paid edition, so the data controls described here are the ones the project itself documents. Telemetry export is optional and disabled by default, so the server sends nothing to an observability backend until someone configures one. This section covers only what the server records or sends. It does not cover the AI client or model provider that receives tool output, which needs its own review.

Start with what the server writes at startup. The configuration reference says the server logs every resolved option with its source and redacts sensitive values such as the token exchange client secret. Confirm in a test deployment that no other credential, kubeconfig path or bearer token appears in startup output. When telemetry is turned on, the OpenTelemetry guide says traces record the tool name, success or failure status, duration and error details, and that metrics are exported to a configured OTLP backend every 30 seconds. Ask the team to confirm whether error text can include object names or fragments of resource data, and check who can read that backend. The /stats JSON endpoint reports tool call counts by name, tool call errors, HTTP request counts and uptime, which is useful for capacity and misuse signals but still needs an access rule of its own.

The main control for keeping Secrets out of reach is access, not logging. The README example uses denied_resources to block the core v1 Secret kind, and the configuration reference lists that key among the settings to review. Before approval, confirm three things: the setting is present in the TOML file that the production process actually loads, the ServiceAccount behind the server cannot read Secrets through RBAC regardless of the MCP setting, and a test call for Secrets is refused and recorded as an error. Separately, confirm with the maintainers or your own tests which resource kinds the denial list covers beyond the README example. Document the answers, because the audit trail depends on them.

Which data controls the server provides and what each one needs

This table compares the data-handling controls built into the open-source containers/kubernetes-mcp-server, whether each is on by default, and what the operator must configure. Read the status column for what ships, and the requirement column for what you must set or verify before approving use. The main takeaway is that tracing and metrics are off unless enabled, and the Secret block is an explicit setting, not a default.

ControlStatus in the open-source serverWhat it requires
Optional OpenTelemetry observabilityDisabled by defaultOperator must enable and configure an OTLP backend
Trace contentsRecords tool name, success or failure, duration and error detailsConfirm whether tool arguments or returned object contents appear in traces
Metrics export to OTLPExported to a configured OTLP backend every 30 secondsA reachable OTLP backend and a decision on where metrics are retained
/stats JSON endpointShows tool call counts by name, tool call errors, HTTP request counts and server uptimeRestrict network access to the endpoint, since it is served by the server
Logging of resolved configurationLogs every resolved option with its source; redacts sensitive values such as the token exchange client secretConfirm the redaction covers every credential you configure, and check the log destination
denied_resourcesBlocks specific resource kinds; the README example denies the core v1 Secret kindSet it in configuration and verify with a test call that Secrets are refused
Direct Kubernetes API accessConnects directly to the API server; needs no kubectl or helm binariesLimit reach through the ServiceAccount's RBAC, since the server does not add that boundary
Log retention on the hostNot covered by the project's documentation reviewed hereTo confirm: where logs are written and how long your host keeps them
Paid or enterprise editionNot described in the project materials reviewed hereTo confirm with the maintainers or your own review before assuming any vendor-backed tier exists

How the server decides what leaves the cluster boundary

The server itself decides what reaches the AI client and what leaves the server as telemetry, and it does so in three places. The MCP server calls the Kubernetes API server directly, so every read is authorized by the Kubernetes API using the identity the server runs under, typically a ServiceAccount. Before a resource is read, the server checks denied_resources from its configuration, which blocks specific resource kinds such as the core v1 Secret kind in the project README example. That check happens at startup configuration, so a reviewer should confirm the deny list is present in the running configuration, not only in a template file.

Each control sits in a different layer, and each needs its own check. Configuration controls such as denied_resources are enforced by the server process. RBAC on the ServiceAccount is enforced by the Kubernetes API, and it still applies to anything the server is not told to deny, so a view-only role limits what can leave the cluster even if the server configuration is changed. Telemetry is enforced by the server only when observability is enabled, and it is off by default. When it is on, traces and metrics go to the OTLP endpoint named in the configuration, so the destination of that endpoint is part of the data review.

Runtime settings live in TOML files, and some options also read environment variables. A reviewer who reads only the TOML file may miss an override set in the deployment environment, including an OTLP endpoint or a setting that changes the port and mode. Ask the platform team to export the effective configuration from the running pod or process and compare it with the file under version control. The configuration reference describes how options are resolved, and the server logs each resolved option with its source, which gives a second record to check against.

Decisions to make before enabling telemetry or exposing the endpoint

Each setting below decides who can see what the Kubernetes MCP server records, exports or returns. Telemetry, HTTP mode, denied resources, secret handling, cluster permissions and host logs all shape the data trail, so they should be decided together and written into the rollout record.

Enable OpenTelemetry and choose the OTLP backend

Observability is optional and disabled by default, so the first decision is whether to turn it on at all. If you do, the OTLP backend becomes a data store: traces record tool name, success or failure status, duration and error details, and metrics go to that backend every 30 seconds. Confirm who can query that backend, how long it keeps traces, and whether error text could echo resource content. Review the OpenTelemetry guide before choosing an endpoint.

OpenTelemetry guide

Run HTTP mode only for controlled access

Setting port in the TOML file runs the server in HTTP mode, and that mode exposes the /stats JSON endpoint. That endpoint reports tool call counts by name, tool call errors, HTTP request counts and server uptime. Anyone who can reach the port can read this usage profile, so keep the listener on a private interface or behind your identity-aware proxy, and confirm which clients reach it. If your team uses stdio only, leave port unset.

Extend denied_resources beyond Secret

The README example denies the core v1 Secret kind, but Secrets are not the only place credentials live. ConfigMaps often hold connection strings, and custom resources can carry tokens or endpoints. Build a deny list from your own inventory of resource kinds, then test that each denied kind returns a refusal rather than data. Keep the list in version control so reviewers can see what the agent cannot read.

Pick the secret supply method deliberately

Runtime settings live in TOML files, and some options also accept environment variables. The server logs every resolved option with its source and redacts sensitive values such as the token exchange client secret. Still, a value in a TOML file sits on disk where the host's file permissions decide who reads it, and an environment variable is visible to anyone who can inspect the process environment. Decide which store holds each secret, set file permissions to the service account only, and verify that the startup log shows redacted values.

Configuration reference

Scope the ServiceAccount RBAC as the outer boundary

The server's denied_resources list limits what it will return, but the cluster role bound to its ServiceAccount is the hard limit on what the Kubernetes API will allow. Any read the server makes runs with that identity, so a broad role can expose data no matter how the server is configured. Use a dedicated ServiceAccount with a view-only role across only the namespaces the agent needs, and check the role with an access review before go-live. Ask the platform team to confirm that no cluster-wide binding grants secret access.

Set host log destination and retention

The server's own telemetry and startup logs are only useful as audit evidence if they are stored somewhere that survives the pod or process. Decide where the host writes logs, who can read and alter them, and how long they are kept, and align that period with your internal audit policy. Test that logs from a restarted process are still available and that redacted values stay redacted in the stored copy. These retention terms belong in the rollout record with the telemetry backend settings.

Where data goes when the server runs with telemetry enabled

The diagram starts with the AI client, which sits outside the scope of this page, and shows its tool calls reaching the Kubernetes MCP server. The server calls the Kubernetes API server directly, then sends traces with tool name, status, duration and error details to a configured OTLP backend, with metrics exported every 30 seconds. The /stats JSON endpoint gives an operator tool call counts, errors, HTTP request counts and uptime. Check which OTLP backend receives the traces, who can reach /stats, and whether telemetry is enabled at all, since it is disabled by default.

Telemetry paths from the MCP server, with the AI client shown outside the page's scope.

Gaps the supplied facts leave open and how to close them

The server's documented telemetry, redaction and filtering controls are a starting point, not a complete privacy answer. The cards below name what the project documentation does not settle, and the test or owner that closes each gap before a cluster is connected.

Trace contents are unconfirmed

The OpenTelemetry guide says traces record tool name, status, duration and error details, but it does not state whether trace attributes or error messages include tool arguments or returned resource data. A Secret read or a resource manifest could appear in an exported span. Test this in a non-production cluster: perform a Secret read, then inspect what arrives at the OTLP backend and who can query it. Treat the backend as a data store holding cluster content until the test says otherwise.

OpenTelemetry guide

Log retention is set outside the server

The supplied documentation does not state a retention period or rotation policy for the server process logs. Retention is determined by the host, the container runtime or the log platform that collects standard output. Ask the platform team which system receives those logs, how long they are kept, who can read them and whether they are deleted on a schedule. Write the answer into your own logging standard so the MCP server inherits it rather than setting its own.

No stated HIPAA or GDPR mapping

The project documentation does not claim a HIPAA or GDPR position for the server, and no compliance attestation applies to an open-source community project. Whether cluster data counts as personal or protected health information depends on what the workloads hold. Take the question to counsel and the data protection officer, and document which workloads are in scope. Assess the AI client and the model provider that receive tool output as separate processors, because the server's own settings do not cover them.

Redaction covers documented values only

The configuration reference says the server logs resolved options with their source and redacts sensitive values such as the token exchange client secret. It does not list every credential that could appear in configuration, environment variables or startup output. Review the resolved configuration output in a test run and search it for kubeconfig paths, bearer tokens, registry credentials and any other secret your deployment supplies. Any value that appears in plain text is a gap to fix before rollout.

Configuration reference

Filtering depends on the server and RBAC

The configuration reference lists denied_resources, and the README example denies the core v1 Secret kind. This is a filter applied by the server, so it is only one layer. Pair it with a dedicated ServiceAccount that has view-only permissions in the namespaces the agent needs. Then confirm, by testing each read path your team uses, that the denial applies to every tool that can return a resource, not only to the obvious get and list calls.

Kubernetes MCP Server README

The stats endpoint lacks stated access control

The OpenTelemetry guide describes a /stats JSON endpoint that exposes tool call counts by name, tool call errors, HTTP request counts and server uptime. The supplied facts do not state whether this endpoint requires authentication. Anyone who can reach it can learn which tools are used and how often. Restrict it at the network layer so only the monitoring system can reach it, or run the server over stdio so no HTTP listener is opened. Confirm the behavior in your own build before relying on either.

How the answer changes with telemetry, transport and data sensitivity

Observability is optional and disabled by default in the containers/kubernetes-mcp-server project, so a default deployment does not export traces or metrics to a backend. Reviewers should still confirm the effective configuration rather than assume it, because the answer depends on what the deployment file actually sets. The server's own outbound behavior is what matters here, and the telemetry guide describes it as opt-in.

  • Confirm the default: Check that no OpenTelemetry export settings are present in the TOML file or environment variables used by the running pod.
  • Check logged options: The configuration reference says the server logs every resolved option with its source and redacts sensitive values such as the token exchange client secret. Review those startup logs to confirm the active settings.
  • Confirm no OTLP export: Verify that no OTLP endpoint is configured and that no collector receives data from the server.
  • Record the decision: Document that telemetry is disabled so auditors can see that tool activity is not exported by design.

Before approval, ask the platform team to show the rendered configuration from the deployed release and the startup log lines that list each resolved option.

Order of work to approve data handling for the server in production

This sequence turns the server's logging, telemetry and denied-resource settings into a documented decision that a security reviewer can sign off before any agent reaches a cluster. Each step closes with a check that must pass before the next one starts.

  1. Classify the clusters the agent may reach

    The cluster owner and the security reviewer list every cluster and namespace the agent could reach through the server, and label each by the most sensitive data it holds, such as customer records, payment data, credentials or regulated health data. Some teams also record which workloads place Secrets in those namespaces and whether any Secret values are used for production access. The step is done when every cluster has a written classification and an owner, and the reviewer agrees that no cluster is left out. Clusters without a classification stay out of scope until one is assigned.

  2. Set telemetry to off unless a backend is approved

    The platform engineer confirms that OpenTelemetry is disabled in the server configuration, since the project documents observability as optional and off by default. Turning it on requires a named OTLP backend, a named data owner and a written retention rule agreed by the security team. The check is a configuration review showing no telemetry settings enabled in any environment, plus a signed decision for each environment that is allowed to enable it. Without an approved backend, nothing leaves the server beyond what the host itself logs.

  3. Define denied_resources and test refused reads

    The platform engineer adds the core v1 Secret kind to denied_resources, as the project README example does, and adds any other kind that carries credentials in the clusters under review, such as service account token objects or external secret resources if the organization uses them. The security engineer then runs a read test with the agent's identity against a Secret in a non-production namespace and confirms the server refuses it. The step is complete only when refused reads are shown for every denied kind, and the same test is repeated after each configuration change.

  4. Confirm configuration sources and check redaction

    The platform engineer lists every place that sets a runtime option, including TOML files, environment variables and any container or Helm values that inject them, and records which value wins. The engineer then starts the server and reads the resolved-options log to confirm each option shows its source and that sensitive values, including the token exchange client secret, are redacted. The check passes when the log shows no plain-text credential and no unexpected source overrides a reviewed setting. Any unexplained override blocks the rollout.

  5. Test sensitive reads when telemetry is on

    If telemetry is approved, a tester asks the agent to read a non-sensitive object and a sensitive object that is safe to use in a test cluster, then inspects what the trace backend and metric backend store for each call. The check is whether traces hold only the tool name, success or failure status, duration and error details as documented, or whether any argument, object content or error text containing a value reaches the backend. The security reviewer records the findings and the team fixes any stored field that should not be there before the setting is accepted.

  6. Restrict the stats endpoint and document retention

    The platform engineer limits access to the /stats JSON endpoint, which exposes tool call counts by name, tool call errors, HTTP request counts and server uptime, so that only the monitoring network or named operators can reach it. The security team then writes the retention period for host logs on the server and for data held by the OTLP backend, and confirms each period with the backend owner. The step closes when the endpoint is reachable only from approved sources and the retention record is signed by the data owner and the security reviewer.

What a security reviewer asks to see for data privacy controls

This table pairs each question a reviewer raises about the Kubernetes MCP server with the evidence to request and where that evidence comes from. Read it as a checklist for the server itself, since the AI client and model provider that receive tool output need their own review. Telemetry and redaction answers come from the server's documented behavior, while the Secret exclusion and RBAC answers depend on your own cluster and configuration.

Reviewer questionEvidence to requestWhere it comes from in the server
Which telemetry signals are emitted, and are they enabled?The effective telemetry configuration file and proof that observability is off or on as intendedOpenTelemetry guide says observability is optional and disabled by default. Confirm the setting in the TOML file or environment variables
Where does exported telemetry go?The OTLP endpoint value from the configuration, plus the access list and retention settings of the receiving backendMetrics are exported to the configured OTLP backend every 30 seconds. Traces record tool name, status, duration and error details
Does the /stats endpoint expose data beyond counts?Network policy or ingress rules showing who can reach the endpoint, and a sample responseThe /stats JSON endpoint reports tool call counts by name, tool call errors, HTTP request counts and uptime
Are Secrets excluded from reach?The denied_resources setting in the active configuration and a test read of Secrets returning a denialConfiguration reference lists denied_resources. The README example denies the core v1 Secret kind
Are credentials kept out of startup logs?A sample of the resolved-options log from a test start, showing redacted values such as client secretsConfiguration reference says the server logs each resolved option with its source and redacts sensitive values such as the token exchange client secret
What can the ServiceAccount read and change?A cluster RBAC export for the ServiceAccount, including any ClusterRoleBinding and namespace RoleBindingsSet by your cluster, not the server. The README points to a production setup with a dedicated ServiceAccount and read-only access
How long are host and backend logs kept?The operator's logging standard, backend retention settings and the log rotation policy on the host running the serverNot defined by the server. Confirm retention with your logging platform and your internal policy

Questions buyers and reviewers ask about the server's data handling

Does the Kubernetes MCP server send data anywhere by default?

No telemetry export is enabled by default. The OpenTelemetry guide says observability is optional and disabled by default, so data leaves the server only after someone configures an OTLP backend. Reviewers should confirm the effective setting in each deployed configuration file rather than rely on the default alone. Data that the AI client receives as tool output is outside this server's telemetry settings and must be assessed separately with the client and model provider.

Can the server stop an agent from reading Kubernetes Secrets?

The configuration reference lists denied_resources, which blocks specific resource kinds, and the project README example denies the core v1 Secret kind. Denial at the server is a second layer only. The Kubernetes RBAC role bound to the ServiceAccount still sets the outer limit, so the ServiceAccount should not hold Secret read permissions in the first place. Confirm both layers with a test that attempts a Secret read through the agent and records the result.

Does the server's logging expose credentials?

The configuration reference says the server logs every resolved option with its source and redacts sensitive values, such as the token exchange client secret. Redaction covers the values the documentation names, so reviewers should check which other settings carry credentials in their own configuration and confirm that they do not appear in log output. Run the server at the log level you plan to use in production and search captured logs for tokens and kubeconfig content before approving it.

What does a trace from the server contain?

According to the OpenTelemetry guide, traces record the tool name, whether the call succeeded or failed, its duration and error details. The guide also describes a /stats JSON endpoint that reports tool call counts by name, tool call errors, HTTP request counts and server uptime. Reviewers should confirm whether any tool arguments or returned resource content are also attached in the version they deploy, since the documented fields do not list them.

What drives the effort to lock down data exposure?

The main drivers are the number of clusters, whether telemetry goes to an existing observability backend or a new one, and how many resource kinds must be denied beyond Secrets. Each cluster needs its own ServiceAccount, RBAC role and configuration review. Teams that already run an OTLP backend mainly add configuration and access review, while teams that add a backend also own its retention and access controls. Ask any implementation partner for a written scope that lists clusters, resource kinds and verification steps.

Can our own team configure these controls, or do we need outside help?

Your own team can set denied_resources, RBAC roles, log handling and the OTLP endpoint using the project's configuration reference and README. Proving that the controls hold is a separate task. A security test that tries to read Secrets, change resources and inspect logs gives evidence for reviewers. DeployOpen performs security testing of AI agent and MCP setups, including tool and file permissions, data exposure and credential handling, and delivers a findings report with fixes and a retest, under a fixed scope agreed in writing.

Does this setup meet HIPAA or GDPR requirements?

The project documentation reviewed for this page does not address HIPAA or GDPR, so it cannot show compliance with either. Whether the setup meets a requirement depends on your own assessment of what data reaches the cluster, what the agent sees in tool output, where that output is processed, and how long it is retained. Involve your privacy and compliance leads and ask the AI client and model provider for their own data processing terms. DeployOpen prepares systems and evidence for compliance assessments but does not issue audit reports or certifications.

Do we have to pay for an edition of the server?

The project is published under the Apache-2.0 license and is a community open-source project, not a Kubernetes project release. The facts reviewed for this page describe only that open-source project and do not list a paid edition, support tier or enterprise feature set. Ask the maintainers and any vendor you work with to confirm whether a commercial edition exists, and budget for your own operating costs, including cluster, identity and observability infrastructure, plus any services you contract for.

How DeployOpen works on this

DeployOpen tests what the Kubernetes MCP server records, exports and exposes before a team relies on it, including whether Secrets and credentials are reachable through its tools. The work covers the server and its configuration, not the AI client or model provider that receives tool output.

How we scope

  • Written scope names the server version, deployment mode and cluster contexts reviewed for data exposure
  • Scope lists which resource kinds, including Secrets, are checked against the denied_resources settings
  • Scope states whether OpenTelemetry tracing, metrics and the /stats endpoint are in or out of review

How we build

  • Test setup is built in the client's environment with a dedicated ServiceAccount and read-only access
  • Tests confirm that denied resource kinds cannot be read, listed or retrieved through any enabled tool
  • Logged options, redacted values and telemetry exports are captured and compared against the configuration reference

How we hand over

  • Findings report covers each data path, with evidence, severity and the setting or permission that changes it
  • Fix guidance names the configuration keys, cluster RBAC changes and telemetry backend settings to adjust
  • Retest confirms each fix, and the evidence pack is organized for the security and compliance reviewers

How we support

  • Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts
  • Ongoing support, upgrades and continuous testing are available as retainers when the server version changes
  • Quotes follow from the written scope, so the reader can confirm exactly which logs and exports are covered

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.