Get cluster namespace Container log

Get cluster namespace Container log

get

Get the logs of Containers in the specified cluster and namespace.

Path parameters
clusterIdstringRequired
namespaceNamestringRequired
podNamestringRequired
Query parameters
typestringRequired

Log Retrieval Method(tail or since)

countstringOptional

The number of lines to read when the type is 'tail' (up to 10,000).

sinceSecondsstringOptional

Return logs from before the value in seconds

Responses
200
OK
*/*
get
GET /v1/clusters/{clusterId}/namespaces/{namespaceName}/pods/{podName}/containers/log?type=text HTTP/1.1
Host: 
Accept: */*
200

OK

[
  {
    "containerName": "api-cmdb",
    "log": "2023-07-03  8:44:55 571828 [Warning] Aborted connection 571828 to db: 'acloud' user: 'root' host: '127.0.0.1' (Got timeout reading communication packets)\n...",
    "podName": "cocktail-api-cmdb-0"
  }
]

Last updated

Was this helpful?