What is a sidecar in the context of microservices? What is a sidecar in the context of microservices? kubernetes kubernetes

What is a sidecar in the context of microservices?


I think of them as helper containers. A pod can have 1 or more containers. A container should do only one thing, like a web server or load balancer. So if you need some extra work to be done inside the pod, like github sync or data processing, you create an additional container AKA sidecar.


The best (original?) description of the "Sidecar"-pattern I know of is from Brendan Burns and David Oppenheimer in their publications on "Container Patterns for Distributed Systems". Check out the paper + slides here:https://www.usenix.org/conference/hotcloud16/workshop-program/presentation/burns

There are other design patterns too, like "Ambassador" or "Adapter". I'm not really sure whether the istio implementation is really a sidecar in the way they describe it there, but anyway I think that's where the term originates from.