My stdout logs are not showing up in Google Logs Viewer, or when using kubectl logs <pod>
. The cluster has Cloud Logging enabled and fluentd containers are running on each node.
Example Python code:
logger = logging.getLogger()
logger.setLevel(logging.INFO)
handler = logging.StreamHandler(sys.stdout)
handler.setLevel(logging.INFO)
logger.addHandler(handler)
logger.info("test log")
The "counter-pod" example from their docs does work on my cluster, so the fluentd containers are picking up stdout and sending it to Logs Viewer.
Any suggestions for things I should try? Thanks in advance.