Skip to main content
Glama

configmap_create

Generate and deploy ConfigMaps in Kubernetes by specifying context, namespace, name, and data, enabling centralized configuration management across multiple clusters.

Instructions

Create a ConfigMap in the specified namespace.

Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The ConfigMap name data: The data to store in the ConfigMap

Returns: Status of the creation operation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
dataYes
nameYes
namespaceYes

Implementation Reference

  • The main handler function for the 'configmap_create' tool. It creates a new Kubernetes ConfigMap in the specified namespace using the provided data. Decorated with @mcp.tool() for automatic registration and schema inference, @use_current_context for context management, and @check_readonly_permission for access control.
    @mcp.tool() @use_current_context @check_readonly_permission def configmap_create(context_name: str, namespace: str, name: str, data: dict): """ Create a ConfigMap in the specified namespace. Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The ConfigMap name data: The data to store in the ConfigMap Returns: Status of the creation operation """ from kubernetes.client import V1ConfigMap, V1ObjectMeta core_v1: CoreV1Api = get_api_clients(context_name)["core"] configmap = V1ConfigMap( metadata=V1ObjectMeta(name=name), data=data ) created_configmap = core_v1.create_namespaced_config_map(namespace=namespace, body=configmap) return {"name": created_configmap.metadata.name, "status": "Created"}
  • server/server.py:10-10 (registration)
    Import statement that loads the tools.configmap module, triggering the execution of @mcp.tool() decorators to register the 'configmap_create' tool (and others in the module). Called within load_modules().
    import tools.configmap # noqa: F401

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