Skip to main content
Glama

clusterrole_delete

Remove a specified ClusterRole from a Kubernetes cluster using the Kubernetes context name and ClusterRole name through the k8s-pilot MCP server.

Instructions

Delete a ClusterRole from the cluster.

Args: context_name: The Kubernetes context name name: The ClusterRole name

Returns: Status of the deletion operation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
nameYes

Implementation Reference

  • Handler function for clusterrole_delete tool. Deletes a ClusterRole using the Kubernetes RBAC API. Registered via @mcp.tool() decorator.
    @mcp.tool() @use_current_context @check_readonly_permission def clusterrole_delete(context_name: str, name: str): """ Delete a ClusterRole from the cluster. Args: context_name: The Kubernetes context name name: The ClusterRole name Returns: Status of the deletion operation """ rbac_v1: RbacAuthorizationV1Api = get_api_clients(context_name)["rbac"] rbac_v1.delete_cluster_role(name=name) return {"name": name, "status": "Deleted"}

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bourbonkk/k8s-pilot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server