replicaset_get
Retrieve detailed information about a specific Kubernetes ReplicaSet by providing context, namespace, and name parameters to inspect pod replication status.
Instructions
Get details of a specific ReplicaSet.
Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The ReplicaSet name
Returns: Detailed information about the ReplicaSet
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| context_name | Yes | ||
| namespace | Yes | ||
| name | Yes |
Implementation Reference
- tools/replicaset.py:61-82 (handler)The replicaset_get tool handler function, which retrieves details of a specific ReplicaSet using the Kubernetes AppsV1Api. Decorated with @mcp.tool() for registration and @use_current_context for context management.@mcp.tool() @use_current_context def replicaset_get(context_name: str, namespace: str, name: str): """ Get details of a specific ReplicaSet. Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The ReplicaSet name Returns: Detailed information about the ReplicaSet """ apps_v1: AppsV1Api = get_api_clients(context_name)["apps"] replicaset = apps_v1.read_namespaced_replica_set(name=name, namespace=namespace) return { "name": replicaset.metadata.name, "replicas": replicaset.status.replicas, "labels": replicaset.metadata.labels, "containers": [c.image for c in replicaset.spec.template.spec.containers] }