---
title: "Get pod logs"
method: GET
path: "/v1/kubernetes/pods/{namespace}/{podName}/logs"
tags: ["Kubernetes"]
---

# Get pod logs

`GET /v1/kubernetes/pods/{namespace}/{podName}/logs`

## Request

- Base URL: `http://kubefwd.internal/api`
- URL: `http://kubefwd.internal/api/v1/kubernetes/pods/{namespace}/{podName}/logs`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/txn2/apis/kubefwd-api/docs/v1/kubernetes/pods/:namespace/:podName/logs/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns log output from a pod's container. Useful for debugging services.

## Path parameters

- `namespace` string, required
- `podName` string, required

## Query parameters

- `context` string
- `container` string
- `tailLines` integer
- `sinceTime` string, date-time
- `previous` boolean
- `timestamps` boolean

## Response `200`

Pod logs

- object
  - `success` boolean
  - `data` object
    - `podName` string
    - `namespace` string
    - `containerName` string
    - `logs` string
    - `lineCount` integer
    - `truncated` boolean
  - `error` ErrorInfo
    - `code` string
    - `message` string
  - `meta` MetaInfo
    - `count` integer
    - `timestamp` string, date-time

## Other responses

- `401`: Missing or invalid API key
- `404`: Pod not found

## Changes

- **2026-07-17** `e4f8bfb653cf`: 1 info
  - added the non-success response with the status `401`
- **2026-01-02** `44eb9688d352`: 1 info
  - endpoint added
- **2025-12-29** `f4c31924c89c`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/txn2/apis/kubefwd-api/changes/v1/kubernetes/pods/:namespace/:podName/logs/get.md)

---

[API](https://skmtc.dev/txn2/apis/kubefwd-api.md) - [All operations](https://skmtc.dev/txn2/apis/kubefwd-api/llms.txt) - [OpenAPI document](https://skmtc.dev/txn2/apis/kubefwd-api/revisions/e4f8bfb653cf?raw)
