get_k8s_logs
ActiveTool of com.googleapis.container/mcp
declared in ESF
Gets logs from a Kubernetes container in a pod. This is similar to running `kubectl logs`.
Parameters schema
{
"type": "object",
"required": [
"parent",
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Required. The name of the resource to retrieve logs from. This can be a pod name (e.g. \"my-pod\") or a type/name (e.g. \"deployment/my-deployment\"). If a type is not specified, \"pod\" is assumed."
},
"tail": {
"type": "string",
"format": "int64",
"description": "Optional. The number of lines from the end of the logs to show."
},
"since": {
"type": "string",
"format": "google-duration",
"description": "Optional. Retrieve logs since this duration ago (e.g. \"1h\", \"10m\")."
},
"parent": {
"type": "string",
"description": "Required. The cluster to retrieve logs from. Format: projects/{project}/locations/{location}/clusters/{cluster}"
},
"previous": {
"type": "boolean",
"description": "Optional. If true, retrieve logs from the previous instantiation of the container."
},
"container": {
"type": "string",
"description": "Optional. The name of the container to retrieve logs from. If not specified, logs from the first container are returned."
},
"namespace": {
"type": "string",
"description": "Optional. The namespace of the resource. If not specified, \"default\" is used."
},
"sinceTime": {
"type": "string",
"format": "date-time",
"description": "Optional. Retrieve logs since this time (RFC3339). e.g. \"2024-08-30T06:00:00Z\"."
},
"timestamps": {
"type": "boolean",
"description": "Optional. If true, include timestamps in the log output."
},
"allContainers": {
"type": "boolean",
"description": "Optional. If true, retrieve logs from all containers in the pod."
}
},
"description": "KubeLogsRequest is the request message for retrieving Kubernetes logs."
}Parent server
com.googleapis.container/mcp
1/7 registries