Skip to main content
Glama

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
NameRequiredDescriptionDefault
context_nameYes
namespaceYes
nameYes

Implementation Reference

  • 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]
        }

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