Skip to main content
Glama

serviceaccount_get

Retrieve detailed information about a specific ServiceAccount in Kubernetes by specifying the context, namespace, and name. Simplify cluster resource management with this tool on the k8s-pilot MCP server.

Instructions

Get details of a specific ServiceAccount.

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

Returns: Detailed information about the ServiceAccount

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
nameYes
namespaceYes

Implementation Reference

  • The serviceaccount_get tool handler function, which retrieves details of a specific Kubernetes ServiceAccount using the CoreV1Api. Registered via @mcp.tool() decorator.
    @mcp.tool() @use_current_context def serviceaccount_get(context_name: str, namespace: str, name: str): """ Get details of a specific ServiceAccount. Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The ServiceAccount name Returns: Detailed information about the ServiceAccount """ core_v1: CoreV1Api = get_api_clients(context_name)["core"] serviceaccount = core_v1.read_namespaced_service_account(name=name, namespace=namespace) return { "name": serviceaccount.metadata.name, "labels": serviceaccount.metadata.labels, "secrets": serviceaccount.secrets }

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