Skip to main content
Glama

replicaset_list

List all ReplicaSets in a specified Kubernetes namespace to monitor and manage application deployments across clusters using the k8s-pilot server.

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

  • Handler function for the 'replicaset_list' tool. Lists ReplicaSets in a namespace using Kubernetes AppsV1Api, decorated with @mcp.tool() for registration.
    @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

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