# Kubernetes Get Pod Logs

Fetch finite pod logs (follow=false). Logs may contain sensitive application data; bounded by tailLines and maxBytes.

Canonical URL: https://opennodeflow.dev/wiki/reference-dev-kubernetes-pod-logs/
JSON reference: https://opennodeflow.dev/wiki/reference-dev-kubernetes-pod-logs/index.json
Source snapshot: 2026-10-23

Fetch finite pod logs (follow=false). Logs may contain sensitive application data; bounded by tailLines and maxBytes.

GET /api/v1/namespaces/{namespace}/pods/{name}/log. Read operation.

Inputs: namespace (optional), name (optional), container (optional), tailLines (optional), sinceSeconds (optional), previous (optional). Missing inputs may come from the selected connection profile config or explicit node defaults. Outputs: status, request_id, operation_url, text. Optional outputs are absent when the provider omits them. HTTP202 is acceptance, not completed work; operation_url exposes a same-origin asynchronous status URL when supplied.

Setup: configure baseUrl (https://kubernetes.example.com), bearer credentials through encrypted secret names or Connections. Default secret name: KUBERNETES_TOKEN. Connection credentials accessToken/apiKey or username/password are resolved at execution. Never put credentials in literal inputs, baseUrl or logs. Required access: Read permission for the selected resource.

Bounds: requestTimeoutMs=15000 (100..120000), maxBytes=1048576 (1024..3000000), maxItems=1000 (1..5000), maxPages=1 (1..20). One bounded request; use the provider-specific explicit paging inputs where offered. HTTPS is required; private HTTP needs allowHttp=true. TLS validation remains enabled. Redirects, cross-origin/escaped continuation URLs and repeated continuations fail. No implicit retries. Error text contains provider/status only, never raw response bodies or credentials. Reconcile an uncertain external action before another attempt.

Synthetic example inputs:

```json
{
  "namespace": "demo",
  "name": "web",
  "tailLines": 10
}
```

This example is documentation, not a run. 

Source: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/ https://kubernetes.io/docs/reference/using-api/api-concepts/

## Operation arguments

Required operation arguments must resolve before a provider request is sent. An input socket can be optional to allow configuration, a connection profile or a documented default to supply the value. Optional socket wiring does not make a required operation target optional.

| Argument | Required at runtime | Type | Default | Constraints |
| --- | --- | --- | --- | --- |
| `namespace` | Yes | string | — | See operation contract |
| `name` | Yes | string | — | See operation contract |
| `container` | No | string | — | See operation contract |
| `tailLines` | No | number | 100 | {"type":"integer","minimum":1,"maximum":10000} |
| `sinceSeconds` | No | number | — | {"type":"integer","minimum":1,"maximum":86400} |
| `previous` | No | boolean | — | See operation contract |


## Catalog identity

| Field | Value |
| --- | --- |
| Source key | `dev.kubernetes.pod-logs` |
| Kind | node |
| Family | kubernetes |
| Pack | pack_kubernetes |

[Integration guide](/wiki/integration-kubernetes/) · [Browse the catalog](/wiki/integration-catalog/)

## Inputs

| Socket ID | Label | Type | Required | Meaning |
| --- | --- | --- | --- | --- |
| `exec` | Execute | control | No |  |
| `namespace` | Namespace | string | No |  |
| `name` | Name | string | No |  |
| `container` | Container | string | No |  |
| `tailLines` | TailLines | number | No |  |
| `sinceSeconds` | SinceSeconds | number | No |  |
| `previous` | Previous | boolean | No |  |

## Outputs

| Socket ID | Label | Type | Required | Meaning |
| --- | --- | --- | --- | --- |
| `next` | Next | control | No |  |
| `status` | Status | number | Yes |  |
| `request_id` | Request Id | string | No |  |
| `operation_url` | Operation Url | string | No |  |
| `text` | Text | string | Yes |  |
| `error` | On error | control | No |  |

## Configuration schema


```json
{
  "type": "object",
  "properties": {
    "baseUrl": {
      "type": "string",
      "maxLength": 2000
    },
    "allowHttp": {
      "type": "boolean",
      "default": false
    },
    "tokenSecret": {
      "type": "string",
      "maxLength": 120
    },
    "username": {
      "type": "string",
      "maxLength": 160
    },
    "usernameSecret": {
      "type": "string",
      "maxLength": 120
    },
    "passwordSecret": {
      "type": "string",
      "maxLength": 120
    },
    "requestTimeoutMs": {
      "type": "integer",
      "minimum": 100,
      "maximum": 120000,
      "default": 15000
    },
    "maxBytes": {
      "type": "integer",
      "minimum": 1024,
      "maximum": 3000000,
      "default": 1048576
    },
    "maxPages": {
      "type": "integer",
      "minimum": 1,
      "maximum": 20,
      "default": 1
    },
    "maxItems": {
      "type": "integer",
      "minimum": 1,
      "maximum": 5000,
      "default": 1000
    },
    "confirmWrites": {
      "type": "boolean",
      "default": false
    }
  },
  "additionalProperties": true
}
```



## Provider operation contract

This source metadata records the exact request method/path, effects, scopes, argument contracts and synthetic examples. It does not establish account permission or provider execution.


```json
{
  "key": "pod-logs",
  "method": "GET",
  "path": "/api/v1/namespaces/{namespace}/pods/{name}/log",
  "effect": "read",
  "description": "Fetch finite pod logs (follow=false). Logs may contain sensitive application data; bounded by tailLines and maxBytes.",
  "scopes": "Read permission for the selected resource.",
  "arguments": {
    "namespace": {
      "type": "string",
      "required": true
    },
    "name": {
      "type": "string",
      "required": true
    },
    "container": {
      "type": "string"
    },
    "tailLines": {
      "type": "number",
      "default": 100,
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 10000
      }
    },
    "sinceSeconds": {
      "type": "number",
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 86400
      }
    },
    "previous": {
      "type": "boolean"
    }
  },
  "response": {
    "kind": "text"
  },
  "sampleInputs": {
    "namespace": "demo",
    "name": "web",
    "tailLines": 10
  },
  "sampleResponse": "service ready\n",
  "sources": [
    "https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/",
    "https://kubernetes.io/docs/reference/using-api/api-concepts/"
  ]
}
```



## Source and installed versions

This reference describes the maintained source catalog snapshot, not a live export of your installation. Published definitions use immutable versions; installed graphs retain their exact pins. Discover and read the installed definition and selected version before wiring it. See [versioning](/wiki/versioning/), [connections](/wiki/connections/) and [integration setup](/wiki/integration-setup/).

---

## Documentation provenance

- `../OpenNodeFlow-Library/work/catalog-all.mjs`
- `../OpenNodeFlow-Library/work/azure-pack-consolidation-20261022/catalog-policy.mjs`
- `../OpenNodeFlow-Library/work/developer-packs-20261022/catalog.mjs`
- `shared/seed.ts`
- `shared/storage-library.ts`
- `shared/variable-library.ts`
- `shared/control-flow.ts`
- `shared/remote-routes.ts`
- `server/runtime-library.ts`
- `shared/error-library.ts`
- `shared/storage-model.ts`
- `shared/builtin-documentation.ts`

This page describes maintained source, not a live inventory or an authorization to perform actions.
