Skip to main content
Glama

Kubernetes Tools MCP Server

by BenedatLLC

get_pod_spec

Retrieve the specification of a Kubernetes pod, including container details, volumes, and network settings, for a specified pod name and namespace. Returns the pod's desired state as a dictionary for analysis or configuration purposes.

Instructions

Retrieves the spec for a given pod in a specific namespace. Args: pod_name (str): The name of the pod. namespace (str): The namespace the pod belongs to (defaults to "default"). Returns ------- dict[str, Any] The pod's spec object, containing its desired state. It is converted from a V1PodSpec to a dictionary. Key fields include: containers : list of kubernetes.client.V1Container List of containers belonging to the pod. Each container defines its image, ports, environment variables, resource requests/limits, etc. init_containers : list of kubernetes.client.V1Container, optional List of initialization containers belonging to the pod. volumes : list of kubernetes.client.V1Volume, optional List of volumes mounted in the pod and the sources available for the containers. node_selector : dict, optional A selector which must be true for the pod to fit on a node. Keys and values are strings. restart_policy : str Restart policy for all containers within the pod. Common values are "Always", "OnFailure", "Never". service_account_name : str, optional Service account name in the namespace that the pod will use to access the Kubernetes API. dns_policy : str DNS policy for the pod. Common values are "ClusterFirst", "Default". priority_class_name : str, optional If specified, indicates the pod's priority_class via its name. node_name : str, optional NodeName is a request to schedule this pod onto a specific node. Raises ------ K8SConfigError If unable to initialize the K8S API K8sApiError If the pod is not found, configuration fails, or any other API error occurs.

Input Schema

NameRequiredDescriptionDefault
namespaceNodefault
pod_nameYes

Input Schema (JSON Schema)

{ "properties": { "namespace": { "default": "default", "title": "Namespace", "type": "string" }, "pod_name": { "title": "Pod Name", "type": "string" } }, "required": [ "pod_name" ], "title": "get_pod_specArguments", "type": "object" }
Install Server

Other Tools from Kubernetes Tools MCP Server

Related Tools

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/BenedatLLC/k8stools'

If you have feedback or need assistance with the MCP directory API, please join our Discord server