apply_yaml

Apply Kubernetes resources from YAML content (upsert: create if missing, patch if exists).

Server K8s MCP rahul007-bit/k8s-mcp
Category Write
Risk class Medium
Parameters 00 required

What apply_yaml does on K8s MCP

AI agents use apply_yaml to create or update resources in K8s MCP — usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your K8s MCP environment.

Why apply_yaml needs a policy

The tool creates or modifies Kubernetes resources through YAML application. While it can alter running infrastructure, it is reversible (resources can be re-applied or deleted). It does not irreversibly delete data (which would be Destructive) or execute arbitrary code within containers (which would be Execute). It is classified as Write due to its create/modify nature.

From the tool's definition Tool description states 'Apply Kubernetes resources from YAML content (upsert: create if missing, patch if exists)' — upsert operations create or modify resources reversibly.

Questions about apply_yaml

What does the apply_yaml tool do? +

Apply Kubernetes resources from YAML content (upsert: create if missing, patch if exists). It is categorised as a Write tool in the K8s MCP MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.

How do I enforce a policy on apply_yaml? +

Register the K8s MCP server in PolicyLayer and add a rule for apply_yaml: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches K8s MCP. Nothing to install.

What risk level is apply_yaml? +

apply_yaml is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.

Can I rate-limit apply_yaml? +

Yes. Add a rate_limit block to the apply_yaml rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block apply_yaml completely? +

Set action: deny in the PolicyLayer policy for apply_yaml. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides apply_yaml? +

apply_yaml is provided by the K8s MCP server (rahul007-bit/k8s-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

// LOOK UP ANOTHER SERVER

Every MCP server has a record like this.

Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.

Teams ship this data inside their own products. See what a licence covers →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.