sidecar container

A helper container that runs beside the main container in the same pod, such as a proxy, a log shipper or a file refresher.

In more detail

Because it shares the pod's network and volumes it can intercept traffic or read files, but it also shares the pod's lifecycle and scaling. Current Kubernetes declares native sidecars as init containers with restartPolicy Always, so they start first and keep running. Do not hide an independent service in a sidecar; if it scales differently, give it its own pods.

Example

log-shipper violates restricted: needs runAsUser not 0, add only NET_BIND_SERVICE

Related terms

Taught in

References