Skip to main content
Glama

deployment_get

Retrieve detailed information about a specific Kubernetes deployment, including status and configuration, to monitor and manage application deployments across clusters.

Instructions

Get details of a specific Deployment.

Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The Deployment name

Returns: Detailed information about the Deployment

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
namespaceYes
nameYes

Implementation Reference

  • Implementation of the deployment_get MCP tool handler. This function is decorated with @mcp.tool() for registration and @use_current_context. It retrieves detailed information about a specific Kubernetes Deployment (name, replicas, labels, containers) in the given namespace using the AppsV1Api client.
    @mcp.tool() @use_current_context def deployment_get(context_name: str, namespace: str, name: str): """ Get details of a specific Deployment. Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The Deployment name Returns: Detailed information about the Deployment """ apps_v1: AppsV1Api = get_api_clients(context_name)["apps"] deployment = apps_v1.read_namespaced_deployment(name=name, namespace=namespace) return { "name": deployment.metadata.name, "replicas": deployment.spec.replicas, "labels": deployment.metadata.labels, "containers": [c.image for c in deployment.spec.template.spec.containers] }

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