get-logs
Retrieve log output from a Kubernetes pod to monitor application behavior, debug issues, and track pod activity. Specify the pod name and optionally set namespace, line count, or enable real-time log streaming.
Instructions
Get logs from a Kubernetes pod
Input Schema
Name | Required | Description | Default |
---|---|---|---|
follow | No | Follow the logs (stream new logs as they come in) | |
lines | No | Number of lines to retrieve from the end of the logs (default: 100) | |
namespace | No | The namespace of the pod (optional, defaults to current context namespace) | |
pod | Yes | The name of the pod to get logs from |
Input Schema (JSON Schema)
{
"properties": {
"follow": {
"description": "Follow the logs (stream new logs as they come in)",
"type": "boolean"
},
"lines": {
"description": "Number of lines to retrieve from the end of the logs (default: 100)",
"type": "number"
},
"namespace": {
"description": "The namespace of the pod (optional, defaults to current context namespace)",
"type": "string"
},
"pod": {
"description": "The name of the pod to get logs from",
"type": "string"
}
},
"required": [
"pod"
],
"type": "object"
}