Skip to main content
Glama

Kubernetes Tools MCP Server

by BenedatLLC

get_logs_for_pod_and_container

Retrieve logs from a Kubernetes pod and container by specifying the namespace, pod name, and optional container name. Simplifies troubleshooting and debugging in Kubernetes clusters.

Instructions

Retrieves logs from a Kubernetes pod and container. Args: namespace (str): The namespace of the pod. pod_name (str): The name of the pod. container_name (str, optional): The name of the container within the pod. If None, defaults to the first container. Returns: str, optional: Log content if any found for this pod/container, or None otherwise Raises ------ K8sConfigError If unable to initialize the K8S API. K8sApiError If the API call to fetch logs fails or an unexpected error occurs.

Input Schema

NameRequiredDescriptionDefault
container_nameNo
namespaceNodefault
pod_nameYes

Input Schema (JSON Schema)

{ "properties": { "container_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Container Name" }, "namespace": { "default": "default", "title": "Namespace", "type": "string" }, "pod_name": { "title": "Pod Name", "type": "string" } }, "required": [ "pod_name" ], "title": "get_logs_for_pod_and_containerArguments", "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