Istio service mesh injection¶
Istio Service mesh injection is the process of automatically modifying application definitions to ensure they are integrated into the Service mesh.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-tcp-echo-readme.md] This is achieved using the istioctl kube-inject command, which enables the Istio data plane (Envoy proxies) to be deployed alongside the application service.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-tcp-echo-readme.md]
Mechanism¶
When applying a resource configuration, such as a Kubernetes Deployment, the standard kubectl apply command can be combined with istioctl via input substitution.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-tcp-echo-readme.md] The command takes the following form:
[kubectl](<./kubectl.md>) apply -f <([istioctl](<./istioctl.md>) kube-inject -f tcp-echo.yaml)
^[400-devops-07-monitoring-and-observability-k8s-istio-samples-tcp-echo-readme.md]
In this workflow, istioctl reads the original manifest file (e.g., tcp-echo.yaml), injects the necessary proxy configuration, and outputs the modified resource which is then piped to kubectl for creation.^[400-devops-07-monitoring-and-observability-k8s-istio-samples-tcp-echo-readme.md]
Related Concepts¶
- [[Sidecar pattern]]
- Service Mesh
- Kubernetes
Sources¶
^[400-devops-07-monitoring-and-observability-k8s-istio-samples-tcp-echo-readme.md]