Skip to main content
Glama

replicaset_list

Display all ReplicaSets within a specified Kubernetes namespace using the provided context name. Simplify cluster resource management with clear insights into ReplicaSet details.

Instructions

List all ReplicaSets in a given namespace.

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

Returns: List of ReplicaSet basic information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
namespaceYes

Implementation Reference

  • The main handler function for the 'replicaset_list' tool. It lists ReplicaSets in the specified namespace using the Kubernetes AppsV1Api. Includes decorators for MCP tool registration and current context usage.
    @mcp.tool() @use_current_context def replicaset_list(context_name: str, namespace: str): """ List all ReplicaSets in a given namespace. Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace Returns: List of ReplicaSet basic information """ apps_v1: AppsV1Api = get_api_clients(context_name)["apps"] replicasets = apps_v1.list_namespaced_replica_set(namespace) result = [{"name": rs.metadata.name, "replicas": rs.status.replicas} for rs in replicasets.items] return result
  • MCP tool registration decorator for replicaset_list.
    @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