GCP Kubernetes all logs apears as error logs

1/15/2020

I have a Kubernetes cluster. All the container logs in the stack driver appear as severity:error.

The browser hass all the requests with status 200.

enter image description here

Is this normal? Thanks

-- fatnjazzy
kubernetes
stackdriver

1 Answer

1/15/2020

When you create a GKE cluster it'll come preconfigured with pushing logs to Stackdriver. And as soon as you start your application on top of GKE, logs going to stdout or stderr from your containers and will be pushed to Stackdriver Logs by Fluentd.

Severity, that you can see in Stackdriver -> Logging -> Logs viewer, depends on where event was collected. So, if your application send event to stderr you'll found it with severity ERROR at Stackdriver.

Try to check where your application send events.

EDIT You can customize Stackdriver logs with Fluentd - follow this documentation.

-- Serhii Rohoza
Source: StackOverflow