<p>we have istio installed without the side car enabled gloablly , and I want to enable it to specific service in a new namespace </p>

<p>I’ve added to my  deployment the following:</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: gow
  labels:
    app: gowspec:
  replicas: 2
  template:
    metadata:
      labels:
        app: gow
        tier: service
      annotations:
        sidecar.istio.io/inject: "true"
</code></pre>

<p>while running </p>

<p><code>get namespace -L istio-injection</code> I don’t see anything enabled , everything is empty…</p>

<p>How can I verify that the side car is created ? I dont see anything new ...</p>

<p>You can use <a href="https://istio.io/docs/setup/getting-started/#download" rel="nofollow noreferrer">istioctl</a> <a href="https://istio.io/docs/setup/additional-setup/sidecar-injection/#manual-sidecar-injection" rel="nofollow noreferrer">kube-inject</a> to make that</p>

<pre><code>kubectl create namespace asdd
istioctl kube-inject -f nginx.yaml | kubectl apply -f - 
</code></pre>

<hr>

<p>nginx.yaml</p>

<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  namespace: asdd
  labels:
    app: nginx
spec:
  replicas: 2
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      annotations:
        sidecar.istio.io/inject: "True"
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.7.9
        ports:
        - containerPort: 80
</code></pre>

<p>Result:</p>

<pre><code>nginx-deployment-55b6fb474b-77788   2/2     Running   0          5m36s
nginx-deployment-55b6fb474b-jrkqk   2/2     Running   0          5m36s
</code></pre>

<p>Let me know if You have any more questions.</p>
