Skip to main content
Glama

mcp-k8s-go

get_k8s_pod_logs_test.yaml2.51 kB
case: Read logs from a single busybox pod in: { "jsonrpc": "2.0", "method": "tools/call", "id": 2, "params": { "name": "get-k8s-pod-logs", "arguments": { "context": "k3d-mcp-k8s-integration-test", "namespace": "test", "pod": "busybox", }, }, } out: { "jsonrpc": "2.0", "id": 2, "result": { "content": [{ "type": "text", "text": "HELLO\n" }], "isError": false }, } --- case: Fail reading logs from a non-existing pod in: { "jsonrpc": "2.0", "method": "tools/call", "id": 2, "params": { "name": "get-k8s-pod-logs", "arguments": { "context": "k3d-mcp-k8s-integration-test", "namespace": "test", "pod": "nonexistingpod", }, }, } out: { "jsonrpc": "2.0", "id": 2, "result": { "content": [{ "type": "text", "text": 'pods "nonexistingpod" not found' }], "isError": true, }, } --- case: Read logs with sinceDuration filter from a single busybox pod in: { "jsonrpc": "2.0", "method": "tools/call", "id": 2, "params": { "name": "get-k8s-pod-logs", "arguments": { "context": "k3d-mcp-k8s-integration-test", "namespace": "test", "pod": "busybox", "sinceDuration": "1s", }, }, } out: # expectation is that the logs are empty, since the pod was created before the sinceDuration # , however, k8s does not allow for filter to be 0s, so there is still chance # that this would fail... but it is very unlikely { "jsonrpc": "2.0", "id": 2, "result": { "content": [{ "type": "text", "text": "" }], "isError": false }, } --- case: Read logs with sinceTime filter from a single busybox pod in: { "jsonrpc": "2.0", "method": "tools/call", "id": 2, "params": { "name": "get-k8s-pod-logs", "arguments": { "context": "k3d-mcp-k8s-integration-test", "namespace": "test", "pod": "busybox", "sinceTime": "2021-01-01T00:00:00Z", }, }, } out: { "jsonrpc": "2.0", "id": 2, "result": { "content": [{ "type": "text", "text": "HELLO\n" }], "isError": false }, }

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/strowk/mcp-k8s-go'

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