Stern, thanks for your reply !
Let me share some details around this issue.
Stackdriver recently made fluentd ingest an exception to popular languages ββin GKE by default. It will be included in the next release of GKE, and exceptions thrown in the stdout / stderr container will be visible in the error report.
Is there a way to get to this level using the fluent-logger-node library?
The registration agent in GCE and GKE works differently. In GCE, you install the agent directly on the virtual machine and can access it from the same virtual machine using localhost . However, GKE works with containers; nothing is installed directly on the node. Each block has its own network stack, so when you call localhost from inside the container, you are not accessing the VM, but rather this particular container.
It is true that fluctd is deployed on each node if you enable Stackdriver Logging. However, it runs inside the container and because of this, you currently cannot easily access it from your application.
In the future, the Stackdriver and GKE teams will work to provide an accessible node to the fluentd public port out of the box, but now, unfortunately, you have to do it yourself.
As already mentioned, it might be easier to deploy another fluentd agent as a sidecar container in the pod application and configure it manually, here is an example of how to do this with the least effort . In this case, you can access the agent using localhost , as if it were on GCE.
source share