A very strange question. When I make a request to fetch the Pod log in the browser, it doesn’t return the latest content, but cURL makes the same request to fetch it. Does anyone know why?
This is the result you get in the browser, and you can see that the latest log entry was 11:20.
If you’re using Kubernetes, you’re likely interacting with the Kubernetes API to fetch Pod logs. When making requests to fetch Pod logs, you typically use the Kubernetes API https://tech-stack.com/blog/what-is-an-api/ endpoint for logs, which follows this general format:
GET /api/v1/namespaces/{namespace}/pods/{podName}/log
This command should ensure that you’re receiving the latest log content as it becomes available. If you’re using a browser to make the request, ensure that the URL includes the follow=true parameter as well.