Istio requires to run a sidecar proxy next to every instance of your containers that needs to participate in the service mesh. There are 2 ways of adding the sidecar proxy:
Automatic sidecar injection
Manual sidecar injection
Automatic Sidecar Injection
You can inject the Istio sidecar automatically for every pod that's deployed into a specific namespace. You can enable automatic injection by annotating the namespace you want to use the service mesh.
Deploy a workload, such as the Helloworld application from the Kubernetes Deployment section.
kubectlapply-fk8s/deployment.yaml
Verify that the Helloworld pod has 2 containers rather than only 1:
kubectlgetpods
Each container within a pod is named. Now that the pod has multiple containers, you can specify a container within the pod using -c containername parameter: