Back to Catalog
Cloud
Structural
Sidecar
Extend container functionality with companion containers
Intent & Description
The Sidecar pattern extends the functionality of a primary container by running companion containers in the same pod. Sidecar containers can add features like logging, monitoring, synchronization, or networking without modifying the main application. They share the same network namespace and can communicate via localhost.
Real-world Use Case
Use when you need to add cross-cutting concerns without modifying the main application or when you want to extend functionality with companion processes.
Source
Advantages
- Extends functionality without app changes
- Shared network namespace
- Independent lifecycle and scaling
- Enables modular architecture
Disadvantages
- Increased resource consumption
- Shared pod lifecycle
- Potential coupling between containers