kubernetes

Get logs for a Kubernetes pod

Changed on

Stream the logs for a pod in the given namespace as text/plain. When follow is set the response stays open and emits new log lines until the client disconnects. When the pod has more than one container, the container query parameter is required. Access policy: Authenticated user.

get/kubernetes/{id}/namespaces/{namespace}/pods/{name}/log

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/kubernetes/{id}/namespaces/{namespace}/pods/{name}/log
  • Auth
    API key in header X-API-KEY and API key in header Authorization

Path parameters

idinteger required

Environment(Endpoint) identifier

namespacestring required

Namespace

namestring required

Pod name

Query parameters

containerstring

Container name (required when the pod has multiple containers)

tailLinesinteger

Number of lines from the end of the logs to return

sinceSecondsinteger

Only return logs newer than this many seconds

timestampsboolean

Prefix each log line with an RFC3339 timestamp

previousboolean

Return the logs of the previous terminated container instance

followboolean

Stream new log lines as they are produced until the client disconnects

Response

Success

Changes