Reading Pod Logs
Function
This API is used to query the logs of a specified pod.
URI
GET /api/v1/namespaces/{namespace}/pods/{name}/log
| Parameter | Description |
|---|---|
| namespace | Object name and auth scope, such as for teams and projects. |
| name | Name of the Pod. |
| Parameter | Mandatory | Description |
|---|---|---|
| pretty | No | If 'true', then the output is pretty printed. |
| exact | No | Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. |
| export | No | Should this value be exported. Export strips fields that a user cannot specify. |
Request
N/A
Response
Example response
Message "Helloworld" printed by the pod:
Tue Sep 3 03:15:25 UTC 2019 Helloworld Tue Sep 3 03:15:26 UTC 2019 Helloworld Tue Sep 3 03:15:27 UTC 2019 Helloworld
Status Code
| Status Code | Description |
|---|---|
| 200 | This operation succeeds. |
For more status codes, see Status Codes.
Last Article: Reading the Status of a Pod
Next Article: Listing All Pods of a User
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.