Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sidecar-container.md created #3173

Closed
wants to merge 4 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions content/en/sidecar-container.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Sidecar Container
status: Completed
fharris marked this conversation as resolved.
Show resolved Hide resolved
category: concept
---

The Sidecar Container is an implementation of the sidecar pattern. An application deployed on a second container will run side by side and share its lifecycle with a primary application running on a main container.

## Problem it addresses

There are scenarios where it is convenient to group [containers](/container/) to deal with problems related to the need to support cross-platform requirements or shared functionality such as logging, monitoring, tracing or [observability](/observability/) in general, and security, traffic management, networking and transversal application configuration. These common functionalities can be implemented independently as services and run on separate containers.

## How it helps

The sidecar terms come after the representation of a classic motorcycle with its attached sidecar. In this metaphor, the bike represents the main container and the sidecar the secondary container. This heterogeneous approach consists of using a separated and isolated process running on a secondary container to address problems that aren't unique to a single application but rather to the entire platform where the application is running. It enforces Separation of Concerns, centralised configuration and governance best practices. Besides its flexibility, it presents other advantages such as extending functionality without changing the main application's code, using different languages deployed on different runtimes, and sharing local resources between the core and the secondary applications.

When applied to Kubernetes deployments, this approach can help create a relationship of one pod to many containers and implies that operational actions used to the pod, such as creation, scaling, and termination, will be equally applied to all containers inside.