21

I'm currently looking through an Istio and Kubernetes talk and mention the management of services along with the use of sidecars. I'm not sure what that is.

richard_d_sim
  • 793
  • 2
  • 10
  • 23

2 Answers2

25

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.

rrh
  • 808
  • 7
  • 12
5

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.

Florian
  • 271
  • 3
  • 14
  • 1
    I've read the burns paper. I think it makes a few assumptions which don't always hold about sidecars, and therefore reaches some conclusions which are not always valid about sidecars. I feel that https://medium.com/netflix-techblog/prana-a-sidecar-for-your-netflix-paas-based-applications-and-services-258a5790a015 gives a better description of when, why and how you should implement and use a sidecar. – user625488 Mar 14 '18 at 13:19