- Kubernetes for Developers
- Joseph Heck
- 84字
- 2025-02-25 15:31:25
Streaming the logs
A common desire is to see a continuously flowing set of logs from your container, updated as the container provides the information. You can enable this with the -f option. For example, to see the updated logs from the Pod associated with the flask deployment, you can run the following command:
kubectl logs deployment/flask -f
As you interact with that service, or that service writes to stdout and does its normal logging, you will see the output streamed to your console.