Knowledgebase

Understanding Sidecars and Init Containers Print

  • 0

Helpers alongside the main container.

WHAT AN INIT CONTAINER IS

One that runs to completion before the main container starts.

WHAT IT SUITS

Waiting for a dependency Preparing files or permissions Fetching configuration

WHAT HAPPENS IF IT FAILS

The pod retries, and the main container never starts.

WHAT A SIDECAR IS

A container running alongside the main one, for its lifetime.

WHAT IT SUITS

Log shipping Proxying network traffic Refreshing credentials Exporting metrics

WHAT THEY SHARE

The network address, and any shared volumes.

WHY THAT MATTERS

The sidecar reaches the main container on the loopback address.

WHAT TO BE CAREFUL WITH

Sidecars that do not exit, preventing jobs from completing Ordering, since containers start together by default Resource consumption, which adds to every pod

WHAT THAT LAST POINT MEANS

A sidecar on a hundred pods is a hundred copies.

WHAT TO WEIGH

Whether the function belongs in the application instead.

WHAT TO PREFER

Fewer containers per pod, unless the coupling is genuine.

WHAT MAKES COUPLING GENUINE

Needing the same network namespace or filesystem.

WHAT TO AVOID

Sidecars added by habit rather than need.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot