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
| Name | Required | Description | Default |
|---|---|---|---|
| context_name | Yes | ||
| namespace | Yes | ||
| name | Yes |
Implementation Reference
- tools/deployment.py:61-82 (handler)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] }