Container log of a pod
GET/pods/logs/:namespace/:podName
Returns the log of one container of a pod as text, like kubectl logs, read from the kubelet through the API server (no exec). The main container by default. tail is 500 lines unless given, 0 reads everything. The same log can be followed over WebSocket at /pods/logstream/{namespace}/{podName} with the same query: a first text frame with the metadata (containers, restarts), one binary frame per line, and a final text frame when the stream ends.
Request
Responses
- 200
- 400
- 500
The log
Bad Request
Internal Server Error