Skip to main content
Glama

replicaset_get

Retrieve detailed information about a specific ReplicaSet in a Kubernetes cluster by providing context name, namespace, and ReplicaSet name. Useful for cluster management and debugging.

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

Implementation Reference

  • The complete implementation of the 'replicaset_get' tool, including registration via @mcp.tool(), type hints serving as input schema, and the handler logic that retrieves ReplicaSet details from Kubernetes API.
    @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] }
  • Registration of the replicaset_get tool using the @mcp.tool() decorator from server.server.mcp.
    @mcp.tool()

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