feat(kubernetes): add support for previousPod container logs (#256)

Add 'previous' parameter to pods_log tool to retrieve logs from terminated containers, equivalent to kubectl logs --previous functionality.
This enables debugging of containers that have restarted due to crashes or updates.

Signed-off-by: Samuel Masuy <samuel.masuy@goto.com>
Co-authored-by: opencode <noreply@opencode.ai>
This commit is contained in:
Samuel Masuy
2025-09-11 03:29:51 -04:00
committed by GitHub
parent 10c82f7bff
commit 6c573f31c8
4 changed files with 41 additions and 2 deletions

View File

@@ -317,6 +317,8 @@ Get the logs of a Kubernetes Pod in the current or provided namespace with the p
- Namespace to get the Pod logs from
- `container` (`string`, optional)
- Name of the Pod container to get logs from
- `previous` (`boolean`, optional)
- Return previous terminated container logs
### `pods_run`