Consul Connect is a great service mesh, but the log output can be very noisy. Using sidecar injection via annotations will cause Envoy proxy and Consul lifecycle containers (consul-connect-envoy-sidecar
and consul-connect-lifecycle-sidecar
respectively) to be injected into your Pods, meaning that Filebeat will parse their output in stdout the same as your application container.
Currently log configuration for the envoy
and consul-k8s
containers are limited, mainly by how much configuration you can supply to the Consul Connect injector webhook. However instead of reducing the verbosity of these logs you can simply omit them from being parsed by Filebeat.
The logs will still be emitted to stdout
so if you need to diagnose an issue you should still be able to access these via `kubectl or the Kubernetes API.
(there should be a way to match the container name by pattern but for some reason I could not get it to work using contains
)