# Demystifying Istio's Sidecar Injection Model

DevFeed: [Demystifying Istio's Sidecar Injection Model](<https://devfeed.tech/articles/demystifying-istio-s-sidecar-injection-model-48681.md>)

Original publisher: [Read original article](<https://istio.io/latest/blog/2019/data-plane-setup/>)

Author: Manish Chugtu

Published: 2019-01-31T00:00:00Z

Content type: article

Language: en

Sources: [Istio](<https://devfeed.tech/sources/istio-blog.md>)

Topics: [istio](<https://devfeed.tech/topics/istio.md>), [service-mesh](<https://devfeed.tech/topics/service-mesh.md>), [container](<https://devfeed.tech/topics/container.md>), [software-architecture](<https://devfeed.tech/topics/software-architecture.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [control-plane](<https://devfeed.tech/topics/control-plane.md>), [Microservices](<https://devfeed.tech/topics/microservices.md>), [proxy](<https://devfeed.tech/topics/proxy.md>), [service](<https://devfeed.tech/topics/service.md>), [Network](<https://devfeed.tech/topics/network.md>), [Security](<https://devfeed.tech/topics/security.md>), [telemetry](<https://devfeed.tech/topics/telemetry.md>)

Tags: [architecture](<https://devfeed.tech/tags/architecture.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [container](<https://devfeed.tech/tags/container.md>), [containers](<https://devfeed.tech/tags/containers.md>), [control-plane](<https://devfeed.tech/tags/control-plane.md>), [developers](<https://devfeed.tech/tags/developers.md>), [envoy](<https://devfeed.tech/tags/envoy.md>), [iptables](<https://devfeed.tech/tags/iptables.md>), [istio](<https://devfeed.tech/tags/istio.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [mesh](<https://devfeed.tech/tags/mesh.md>), [microservices](<https://devfeed.tech/tags/microservices.md>), [network](<https://devfeed.tech/tags/network.md>), [proxy](<https://devfeed.tech/tags/proxy.md>), [service](<https://devfeed.tech/tags/service.md>), [services](<https://devfeed.tech/tags/services.md>), [sidecar](<https://devfeed.tech/tags/sidecar.md>), [sidecar-injection](<https://devfeed.tech/tags/sidecar-injection.md>), [telemetry](<https://devfeed.tech/tags/telemetry.md>), [traffic-management](<https://devfeed.tech/tags/traffic-management.md>)

## AI overview

This article explains how Istio injects sidecar containers into application pods for its service mesh. It covers automatic and manual injection, the init container that configures traffic redirection, and the Envoy-based sidecar proxy.

## Source excerpt

A simple overview of an Istio service-mesh architecture always starts with describing the control-plane and data-plane. From Istio's documentation: An Istio service mesh is logically split into a data plane and a control plane. The data plane is composed of a set of intelligent proxies (Envoy) deployed as sidecars. These proxies mediate and control all network communication between microservices along with Mixer, a general-purpose policy and telemetry hub. The control plane manages and configures the proxies to route traffic. Additionally, the control plane configures Mixers to enforce policies and collect telemetry. Istio Architecture It is important to understand that the sidecar injection into the application pods happens automatically, though manual injection is also possible. Traffic is directed from the application services to and from these sidecars without developers needing to worry about it. Once the applications are connected to the Istio service mesh, developers can start using and reaping the benefits of all that the service mesh has to offer. However, how does the data plane plumbing happen and what is really required to make it work seamlessly? In this post, we will deep-dive into the specifics of the sidecar injection models to gain a very clear understanding of how sidecar injection works. Sidecar injection In simple terms, sidecar injection is adding the configuration of additional containers to the pod template. The added containers needed for the Istio service mesh are: istio-init This init container is used to setup the iptables rules so that inbound/outbound traffic will go through the sidecar proxy. An init container is different than an app container in following ways: It runs before an app container is started and it always runs to completion. If there are many init containers, each should complete with success before the next container is started. So, you can see how this type of container is perfect for a set-up or initialization job which